From 83c1bfceb1b681b4bb7253b47491be2d8b2014a1 Mon Sep 17 00:00:00 2001 From: debashisdeb Date: Fri, 20 Jun 2014 15:42:42 +0530 Subject: removing problem statements --- Electronic_Principles_/Chapter_10_New.ipynb | 45 ----------- Electronic_Principles_/Chapter_11_New.ipynb | 56 -------------- Electronic_Principles_/Chapter_12_New.ipynb | 68 ----------------- Electronic_Principles_/Chapter_13_New.ipynb | 104 ------------------------- Electronic_Principles_/Chapter_14_New.ipynb | 82 -------------------- Electronic_Principles_/Chapter_15_New.ipynb | 53 ------------- Electronic_Principles_/Chapter_16_New.ipynb | 113 ---------------------------- Electronic_Principles_/Chapter_17_New.ipynb | 75 ------------------ Electronic_Principles_/Chapter_18_New.ipynb | 73 ------------------ Electronic_Principles_/Chapter_19_New.ipynb | 71 ----------------- Electronic_Principles_/Chapter_1_New.ipynb | 31 -------- Electronic_Principles_/Chapter_20_New.ipynb | 55 -------------- Electronic_Principles_/Chapter_21_New.ipynb | 66 ---------------- Electronic_Principles_/Chapter_22_New.ipynb | 52 ------------- Electronic_Principles_/Chapter_23_New.ipynb | 79 ------------------- Electronic_Principles_/Chapter_24_New.ipynb | 89 ---------------------- Electronic_Principles_/Chapter_2_New.ipynb | 17 ----- Electronic_Principles_/Chapter_3_New.ipynb | 36 --------- Electronic_Principles_/Chapter_4_New.ipynb | 51 ------------- Electronic_Principles_/Chapter_5_New.ipynb | 62 --------------- Electronic_Principles_/Chapter_6_New.ipynb | 62 --------------- Electronic_Principles_/Chapter_7_New.ipynb | 53 ------------- Electronic_Principles_/Chapter_8_New.ipynb | 31 -------- Electronic_Principles_/Chapter_9_New.ipynb | 32 -------- 24 files changed, 1456 deletions(-) (limited to 'Electronic_Principles_') diff --git a/Electronic_Principles_/Chapter_10_New.ipynb b/Electronic_Principles_/Chapter_10_New.ipynb index 2a7ee3d8..c36aae9c 100644 --- a/Electronic_Principles_/Chapter_10_New.ipynb +++ b/Electronic_Principles_/Chapter_10_New.ipynb @@ -27,21 +27,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 10.1.py\n", - "#What is the voltage gain & output voltage across the load resistor? \n", "\n", - "#Variable declaration\n", "re=22.7 #Ac resistance as per example 9-5(Ohm)\n", "RC=3.6 #Collector Resistance(KOhm)\n", "RL=10 #Load Resistance(KOhm)\n", "Vin=2 #Input voltage(mV)\n", "\n", - "#Calculation\n", "rc=RC*RL/(RC+RL) #AC collector resistance(Ohm)\n", "Av=(rc/re)*1000 #Voltage gain\n", "Vout=Av*Vin #Output voltage(mV)\n", "\n", - "#Result\n", "print 'Voltage gain Av = ',round(Av,2)\n", "print 'Output voltage Vout = ',round(Vout,2),'mV'" ], @@ -71,10 +66,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 10.2.py\n", - "#What is the voltage gain & output voltage across the load resistor?\n", "\n", - "#Variable declaration\n", "RC=3.6 #Collector Resistance(KOhm)\n", "RL=2.2 #Load Resistance(KOhm)\n", "Vin=5 #Input voltage(mV)\n", @@ -82,14 +74,12 @@ "RE=10 #Emitter resistance(KOhm)\n", "VBE=0.7 #Base-emitter voltage drop(V)\n", "\n", - "#Calculation\n", "rc=RC*RL/(RC+RL) #AC collector resistance(Ohm)\n", "IE=(VEE-VBE)/RE #emitter current(mA)\n", "re=25/IE #AC resistance(Ohm)\n", "Av=(rc/re)*1000 #Voltage gain\n", "Vout=Av*Vin #Output voltage(mV)\n", "\n", - "#Result\n", "print 'Emitter current IE = ',IE,'mA'\n", "print 'Voltage gain Av = ',round(Av,2)\n", "print 'Output voltage Vout = ',round(Vout,2),'mV'" @@ -121,10 +111,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 10.3.py\n", - "#In figure 10-4, Rs = 600 Ohm. find output voltage for B=300.\n", "\n", - "#Variable declaration\n", "re=22.7 #Ac resistance as per example 9-5(Ohm)\n", "B=300 #current gain\n", "R1=10 #Base resistance1 (KOhm)\n", @@ -133,13 +120,11 @@ "Av=117 #Voltage gain as per example 10-1\n", "Vs=2 #ac voltage supply(mV)\n", "\n", - "#Calculation\n", "Zin_base=B*re/1000 #input impedance of base(KOhm)\n", "Zin_stage=((R1**-1)+(Zin_base**-1)+(R2**-1))**-1 #input impedance of stage(KOhm)\n", "Vin=(Zin_stage/(Rs+Zin_stage))*Vs #input voltage(mV)\n", "Vout=Av*Vin #output voltage(mV)\n", "\n", - "#Result\n", "print 'input impedance of stage Zin(stage) = ',round(Zin_stage,2),'KOhm'\n", "print 'Output volatge Vout = ',round(Vout,2),'mV'" ], @@ -169,10 +154,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 10.4.py\n", - "#Repeat preceding example for B=50.\n", "\n", - "#Variable declaration\n", "re=22.7 #Ac resistance as per example 9-5(Ohm)\n", "B=50 #current gain\n", "R1=10 #Base resistance1 (KOhm)\n", @@ -181,13 +163,11 @@ "Av=117 #Voltage gain as per example 10-1\n", "Vs=2 #ac voltage supply(mV)\n", "\n", - "#Calculation\n", "Zin_base=B*re/1000 #input impedance of base(KOhm)\n", "Zin_stage=((R1**-1)+(Zin_base**-1)+(R2**-1))**-1 #input impedance of stage(KOhm)\n", "Vin=(Zin_stage/(Rs+Zin_stage))*Vs #input voltage(mV)\n", "Vout=Av*Vin #output voltage(mV)\n", "\n", - "#Result\n", "print 'input impedance of stage Zin(stage) = ',round(Zin_stage,2),'KOhm'\n", "print 'Output volatge Vout = ',round(Vout,2),'mV'" ], @@ -217,10 +197,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 10.5.py\n", - "#Find ac collector voltage & output voltage across the load resistor in first stage. \n", "\n", - "#Variable declaration\n", "re=22.7 #Ac resistance as per example 9-5(Ohm)\n", "B=100 #current gain\n", "R1=10 #Base resistance1 (KOhm)\n", @@ -230,7 +207,6 @@ "Vs=1 #ac voltage supply(mV)\n", "RL=10 #Load resistance(KOhm)\n", "\n", - "#Calculation\n", "Zin_base=B*re/1000 #input impedance of base(KOhm)\n", "Zin_stage1=((R1**-1)+(Zin_base**-1)+(R2**-1))**-1 #input impedance of stage1(KOhm)\n", "Vin=(Zin_stage1/(Rs+Zin_stage1))*Vs #input voltage(mV)\n", @@ -244,7 +220,6 @@ "Av=Av1*Av2 #Overall voltage gain\n", "Voutf=Av*Vin #AC output voltage across RL(V)\n", "\n", - "#Result\n", "print 'AC collector voltage of first stage vc = ',round(vc*1000,2),'mV'\n", "print 'AC output voltage across load resistor Vout = ',round(Voutf*1000,2),'V'" ], @@ -274,10 +249,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 10.6.py\n", - "#What is the output voltage across RL if B=200? Ignore re'. \n", "\n", - "#Variable declaration\n", "VCC=10 #collector voltage(V)\n", "RC=3.6 #Collector resistance (KOhm)\n", "re=0.18 #Emitter resistance (KOhm)\n", @@ -289,7 +261,6 @@ "RL=10 #Load resistance(KOhm)\n", "B=200 #current gain \n", "\n", - "#Calculation\n", "Zin_base=B*re #input impedance of base(KOhm)\n", "Zin_stage=((R1**-1)+(Zin_base**-1)+(R2**-1))**-1 #input impedance of stage(KOhm)\n", "Vin=(Zin_stage/(Rs+Zin_stage))*Vs #input voltage(mV)\n", @@ -297,7 +268,6 @@ "Av=rc/re #Voltage gain of stage\n", "Vout=Av*Vin #output voltage(mV)\n", "\n", - "#Result\n", "print 'input impedance of stage Zin(stage) = ',round(Zin_stage,2),'KOhm'\n", "print 'Output volatge Vout = ',round(Vout,2),'mV'" ], @@ -327,10 +297,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 10.7.py\n", - "#Repeat preceding example, but this time include re' in calculations.\n", "\n", - "#Variable declaration\n", "VCC=10 #collector voltage(V)\n", "RC=3.6 #Collector resistance (KOhm)\n", "re=0.18 #Emitter resistance (KOhm)\n", @@ -343,7 +310,6 @@ "RL=10 #Load resistance(KOhm)\n", "B=200 #current gain \n", "\n", - "#Calculation\n", "Zin_base=B*(re+re1) #input impedance of base(KOhm)\n", "Zin_stage=((R1**-1)+(Zin_base**-1)+(R2**-1))**-1 #input impedance of stage(KOhm)\n", "Vin=(Zin_stage/(Rs+Zin_stage))*Vs #input voltage(mV)\n", @@ -351,7 +317,6 @@ "Av=rc/(re+re1) #Voltage gain of stage\n", "Vout=Av*Vin #output voltage(mV)\n", "\n", - "#Result\n", "print 'input impedance of stage Zin(stage) = ',round(Zin_stage,2),'KOhm'\n", "print 'Output volatge Vout = ',round(Vout,2),'mV'" ], @@ -381,10 +346,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 10.8.py\n", - "#What is the output voltage in figure 10-9 if B=200? Ignore re'. \n", "\n", - "#Variable declaration\n", "re=0.18 #emitter reistance(Ohm)\n", "B=200 #current gain\n", "R1=10 #Base resistance1 (KOhm)\n", @@ -394,7 +356,6 @@ "Vs=1 #ac voltage supply(mV)\n", "RL=10 #Load resistance(KOhm)\n", "\n", - "#Calculation\n", "Zin_base=B*re #input impedance of base(KOhm)\n", "Zin_stage1=((R1**-1)+(Zin_base**-1)+(R2**-1))**-1 #input impedance of stage1(KOhm)\n", "Vin=(Zin_stage1/(Rs+Zin_stage1))*Vs #input voltage(mV)\n", @@ -408,7 +369,6 @@ "Av=Av1*Av2 #Overall voltage gain\n", "Voutf=Av*Vin #AC output voltage across RL(V)\n", "\n", - "#Result\n", "print 'AC collector voltage of first stage vc = ',round(vc,2),'mV'\n", "print 'AC output voltage across load resistor Vout = ',round(Voutf,2),'mV'" ], @@ -438,21 +398,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 10.9.py\n", - "#A resistor can be varied from 0 to 10 KOhm. then What is the min & max voltage gain of the two-stage amplifier?\n", "\n", - "#Variable declaration\n", "RV_min=0 #minimum variable resistance (KOhm)\n", "RV_max=10 #maximum variable resistance (KOhm)\n", "re=0.1 #Emitter resistance (KOhm)\n", "\n", - "#Calculation\n", "rf_min=RV_min+1 #minimum feedback resistance(KOhm)\n", "rf_max=RV_max+1 #maximum feedback resistance(KOhm)\n", "Av_min=rf_min/re #minimum voltage gain\n", "Av_max=rf_max/re #maximum voltage gain\n", "\n", - "#Result\n", "print 'minimum voltage gain Av(min)= ',Av_min\n", "print 'minimum voltage gain Av(max)= ',Av_max" ], diff --git a/Electronic_Principles_/Chapter_11_New.ipynb b/Electronic_Principles_/Chapter_11_New.ipynb index 5a7be77e..9065b138 100644 --- a/Electronic_Principles_/Chapter_11_New.ipynb +++ b/Electronic_Principles_/Chapter_11_New.ipynb @@ -27,10 +27,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 11.1.py\n", - "#What is the input impedance of the base & stage. B=200.\n", "\n", - "#Variable declaration\n", "VCC=10 #collector voltage(V)\n", "RE=4.3 #Emitter resistance(KOhm)\n", "R1=10 #Base resistance1 (KOhm)\n", @@ -41,7 +38,6 @@ "RG=0.6 #internal resistance of source(KOhm)\n", "B=200 #current gain \n", "\n", - "#Calculation\n", "VBB=VCC/2 #Base voltage(V)\n", "VE=VBB-VBE #Emitter voltage(V)\n", "IE=VE/RE #Emitter current(mA)\n", @@ -50,7 +46,6 @@ "Zin_base=(re+(re1/1000))*B #input impedance of base(KOhm)\n", "Zin_stage=((R1**-1)+(Zin_base**-1)+(R2**-1))**-1 #input impedance of stage(KOhm)\n", "\n", - "#Result\n", "print 'input impedance of stage Zin(base) = ',round(Zin_base,2),'KOhm'\n", "print 'input impedance of stage Zin(stage) = ',round(Zin_stage,2),'KOhm'" ], @@ -80,20 +75,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 11.2.py\n", - "#Assuming B=200, What is ac input voltage to emitter follower of figure 11-3?\n", "\n", - "#Variable declaration\n", "re=3.03 #Emitter resistance(KOhm)\n", "VG=1 #Input voltage(mV)\n", "RG=0.6 #internal resistance of source(KOhm)\n", "B=200 #current gain \n", "Zin=5 #input impedance(KOhm)\n", "\n", - "#Calculation\n", "Vin=(Zin/(Zin+RG))*VG #input voltage(V)\n", "\n", - "#Result\n", "print 'Input voltage Vin = ',round(Vin,2),'V'" ], "language": "python", @@ -121,10 +111,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 11.3.py\n", - "#What is the voltage gain of the emitter follower of figure 11-5? If B=150, what is the ac load voltage? \n", "\n", - "#Variable declaration\n", "VCC=15 #collector voltage(V)\n", "RE=2.2 #Emitter resistance(KOhm)\n", "R1=4.7 #Base resistance1 (KOhm)\n", @@ -135,7 +122,6 @@ "RG=0.6 #internal resistance of source(KOhm)\n", "B=150 #current gain \n", "\n", - "#Calculation\n", "VBB=VCC/2.0 #Base voltage(V)\n", "VE=VBB-VBE #Emitter voltage(V)\n", "IE=VE/RE #Emitter current(mA)\n", @@ -148,7 +134,6 @@ "Vout=Av*Vin #output voltage(V)\n", "\n", "\n", - "#Result\n", "print 'input impedance of stage Zin(base) = ',round(Zin_base,2),'KOhm'\n", "print 'input impedance of stage Zin(stage) = ',Zin_stage,'KOhm'\n", "print 'voltage gain of emitter follower Av = ',round(Av,3)\n", @@ -182,17 +167,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 11.4.py\n", - "#Calculate the output impedance of the emitter follower of figure 11-9a.\n", "\n", - "#Variable declaration\n", "RG=600 #internal resistance of source(KOhm)\n", "B=300 #current gain \n", "\n", - "#Calculation\n", "Zout=RG/B #Output impedance(KOhm)\n", "\n", - "#Result\n", "print 'Output impedance Zout = ',Zout,'Ohm'" ], "language": "python", @@ -220,10 +200,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 11.5.py\n", - "#Calculate the output impedance in figure 11-9a.\n", "\n", - "#Variable declaration\n", "VCC=30 #collector voltage(V)\n", "RE=0.1 #Emitter resistance(KOhm)\n", "R1=10 #Base resistance1 (KOhm)\n", @@ -233,7 +210,6 @@ "RG=0.6 #internal resistance of source(KOhm)\n", "B=300 #current gain \n", "\n", - "#Calculation\n", "VBQ=VCC/2.0 #Base voltage(V)\n", "VEQ=VBQ #Emitter voltage(V), ignore VBE\n", "IEQ=VEQ/RE #Emitter current(mA)\n", @@ -243,7 +219,6 @@ "Ze=Z+re #impedance looking back into emitter(Ohm)\n", "Zout=(((RE*1000)**-1)+(Ze**-1))**-1 #Output impedance(Ohm)\n", "\n", - "#Result\n", "print 'Output impedance is Zout = ',round(Zout,2),'Ohm'" ], "language": "python", @@ -271,10 +246,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 11.6.py\n", - "#What is the voltage gain of the CE stage in figure 11-10 for B = 100? \n", "\n", - "#Variable declaration\n", "VCC=10 #collector voltage(V)\n", "RE=0.68 #Emitter resistance(KOhm)\n", "RC=3.6 #Collector resistance (KOhm)\n", @@ -286,7 +258,6 @@ "RL=0.27 #Load resistance(KOhm)\n", "B=100 #current gain \n", "\n", - "#Calculation\n", "VBB=(R1*R2/(R1+R2)) #Base voltage(V)\n", "VE=VBB-VBE #Emitter voltage(V)\n", "IE=VE/RE #Emitter current(mA)\n", @@ -295,7 +266,6 @@ "rc=((RC**-1)+(Zin**-1))**-1 #ac collector resistance(KOhm)\n", "Av=rc/(re/1000) #voltage gain of stage\n", "\n", - "#Result\n", "print 'voltage gain of CE stage Av = ',round(Av,2)" ], "language": "python", @@ -323,11 +293,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 11.7.py\n", - "#Emitter follower is removed in fig 11-10 and capacitor is used to couple the ac signal to RL = 270 Ohm. \n", - "#What is the voltage gain of CE amplifier?\n", "\n", - "#Variable declaration\n", "VCC=10 #collector voltage(V)\n", "RE=0.68 #Emitter resistance(KOhm)\n", "RC=3.6 #Collector resistance (KOhm)\n", @@ -339,7 +305,6 @@ "RL=0.27 #Load resistance(KOhm)\n", "B=100 #current gain \n", "\n", - "#Calculation\n", "VBB=10*(R2/(R1+R2)) #Base voltage(V)\n", "VE=VBB-VBE #Emitter voltage(V)\n", "IE=VE/RE #Emitter current(mA)\n", @@ -347,7 +312,6 @@ "rc=((RC**-1)+(RL**-1))**-1 #ac collector resistance(KOhm)\n", "Av=rc/(re/1000) #voltage gain of stage\n", "\n", - "#Result\n", "print 'voltage gain of CE stage Av = ',round(Av,2)" ], "language": "python", @@ -375,10 +339,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 11.8.py\n", - "#If each transistor of figure 11-13 has B=100, find overall current gain, IB of Q1 & input impedance at base of Q1?\n", "\n", - "#Variable declaration\n", "VCC=15 #collector voltage(V)\n", "RE=0.06 #Emitter resistance(KOhm)\n", "R1=10.0 #Base resistance1 (KOhm)\n", @@ -389,7 +350,6 @@ "B1=100 #current gain of Q1\n", "B2=100 #current gain of Q2\n", "\n", - "#Calculation\n", "B=B1*B2 #Overall current gain\n", "VBB=15*(R2/(R1+R2)) #Base voltage(V)\n", "VE=VBB-(2*VBE) #Emitter voltage(V)\n", @@ -400,7 +360,6 @@ "re=((RE**-1)+(RL**-1))**-1 #ac emitter resistance(KOhm)\n", "Zin_base=B*re #input impedance of Q1(KOhm)\n", "\n", - "#Result\n", "print 'Overall current gain B = ',B\n", "print 'base current of Q1 IB1 = ',round(IB1,2),'uA'\n", "print 'input impedance at base of Q1 Zin(base) = ',Zin_base,'KOhm'" @@ -432,24 +391,19 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 11.9.py\n", - "#Figure 11-16 shows a zener follower. find output voltage & zener current for Bdc=100.\n", "\n", - "#Variable declaration\n", "Vin=20 #input voltage (V)\n", "RL=15 #Load resistance(Ohm)\n", "Vz=10 #voltage across zener(V)\n", "B=100 #current gain\n", "Rs=680.0 #series resistor(Ohm)\n", "\n", - "#Calculation\n", "Vout=Vz-0.7 #Output voltage approx.(V)\n", "Iout=Vout/RL #Load current(A)\n", "IB=Iout*1000/B #base current(mA)\n", "Is=(Vin-Vz)*1000/Rs #current through series resistor(mA)\n", "Iz=Is-IB #zener current(mA)\n", "\n", - "#Result\n", "print 'output voltage Vout = ',Vout,'V'\n", "print 'Zener current Iz = ',round(Iz,2),'mA'" ], @@ -479,10 +433,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 11.10.py\n", - "#What is the output voltage in figure 11-17?\n", "\n", - "#Variable declaration\n", "Vin=30 #input voltage (V)\n", "RL=100 #Load resistance(Ohm)\n", "Vz=6.2 #voltage across zener(V)\n", @@ -491,12 +442,10 @@ "R1=1 #Resistor (KOhm)\n", "R2=2 #Resistor (KOhm)\n", "\n", - "#Calculation\n", "Vout=(Vz+0.7)*(R1+R2)/R1 #Output voltage approx.(V)\n", "I1=(Vz+0.7)/R1 #Load current(A)\n", "Vout=I1*(R1+R2) #Output voltage(V)\n", "\n", - "#Result\n", "print 'output voltage Vout = ',Vout,'V'" ], "language": "python", @@ -524,10 +473,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 11.11.py\n", - "#What is the output voltage in figure 11-20?\n", "\n", - "#Variable declaration\n", "VG=2 #AC input voltage (mV)\n", "Vs=10 #supply volatge(V)\n", "RL=10 #Load resistance(KOhm)\n", @@ -537,7 +483,6 @@ "RC=3.6 #collector resistor (KOhm)\n", "RE=2.2 #emitter resistance(KOhm)\n", "\n", - "#Calculation\n", "VB=Vs*R2/(R1+R2) #Base voltage(V)\n", "IE=(VB-0.7)*1000/RE #emitter current(uA)\n", "re=(25/IE)*1000 #ac resistance(Ohm)\n", @@ -548,7 +493,6 @@ "Vin=(Zin/(Zin+RG))*VG #input voltage(V)\n", "Vout=Av*Vin #output voltage(mV)\n", "\n", - "#Result\n", "print 'output voltage Vout = ',round(Vout,2),'mVpp'" ], "language": "python", diff --git a/Electronic_Principles_/Chapter_12_New.ipynb b/Electronic_Principles_/Chapter_12_New.ipynb index 268348c4..9f88647a 100644 --- a/Electronic_Principles_/Chapter_12_New.ipynb +++ b/Electronic_Principles_/Chapter_12_New.ipynb @@ -27,12 +27,9 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 12.1.py\n", - "#What are the values of ICQ,VCEQ,rc in figure 12-7?\n", "\n", "import math # This will import math module\n", "\n", - "#Variable declaration\n", "VCC=30 #collector voltage(V)\n", "RE=20 #Emitter resistance(Ohm)\n", "R1=490.0 #Base resistance1 (Ohm)\n", @@ -41,7 +38,6 @@ "RL=180 #Load Resistance(Ohm)\n", "RC=120 #Collector resistance(Ohm)\n", "\n", - "#Calculation\n", "VB=VCC*(R2/(R1+R2)) #Base voltage(V)\n", "VE=math.ceil(VB-VBE) #Emitter voltage(V)\n", "IE=VE/RE #Emitter current(A)\n", @@ -50,7 +46,6 @@ "VCEQ=VC-VE #collector-emitter voltage (V) \n", "rc=RC*RL/(RC+RL) #ac collector resistance(Ohm)\n", "\n", - "#Result\n", "print 'Collector current ICQ = ',ICQ*1000,'mA'\n", "print 'collector-emitter voltage VCEQ = ',VCEQ,'V'\n", "print 'ac collector resistance rc = ',rc,'Ohm'" @@ -82,10 +77,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 12.2.py\n", - "#Determine the ac load line saturation and cutoff points in figure 12-7 & find MPP output voltage. \n", "\n", - "#Variable declaration\n", "\n", "VCC=30 #collector voltage(V)\n", "RE=20 #Emitter resistance(Ohm)\n", @@ -95,19 +87,16 @@ "RL=180 #Load Resistance(Ohm)\n", "RC=120 #Collector resistance(Ohm)\n", "\n", - "#values from previous example,\n", "ICQ=150 #collector current (mA)\n", "VCEQ=9 #collector-emitter voltage (V) \n", "rc=72.0 #ac collector resistance(Ohm)\n", "\n", - "#Calculation\n", "ic_sat=ICQ+(VCEQ/rc)*1000 #ic(sarturation) (mA)\n", "VCE_cut=VCEQ+((ICQ*rc)/1000) #VCE(cut-off) (V)\n", "MP1=ICQ*RC\n", "MP2=VCEQ\n", "MPP=2*(min(MP1,MP2)) #maximum peak-to-peak voltage (V)\n", "\n", - "#Result\n", "print 'ic(sarturation) = ',ic_sat,'mA'\n", "print 'VCE(cut-off) = ',VCE_cut,'V'\n", "print 'maximum peak-to-peak voltage MPP = ',MPP,'V'" @@ -139,12 +128,9 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 12.3.py\n", - "#If Vpp is 18V and the input impedance of base is 100 Ohm, what is power gain in figure 12-9a?\n", "\n", "import math # This will import math module\n", "\n", - "#Variable declaration\n", "VCC=30 #collector voltage(V)\n", "RE=20 #Emitter resistance(Ohm)\n", "R1=490.0 #Base resistance1 (Ohm)\n", @@ -156,13 +142,11 @@ "zin=100 #input impedance of base(Ohm)\n", "MPP=18 #peak-to-peak voltage (V)\n", "\n", - "#Calculation\n", "Zin_stage=((zin**-1)+(R1**-1)+(R2**-1))**-1 #input impedance of stage(KOhm)\n", "Pin=vin**2/(Zin_stage*8)/1000 #ac input power (mW)\n", "Pout=1000*MPP**2/(RL*8) #ac output power (mW)\n", "Ap=Pout/Pin #power gain\n", "\n", - "#Result\n", "print 'Power gain Ap = ',math.ceil(Ap)" ], "language": "python", @@ -190,12 +174,9 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 12.4.py\n", - "#What is the transistor power dissipation and efficiency in figure 12-9a?\n", "\n", "import math # This will import math module\n", "\n", - "#Variable declaration\n", "VCC=30 #collector voltage(V)\n", "RE=20 #Emitter resistance(Ohm)\n", "R1=490.0 #Base resistance1 (Ohm)\n", @@ -204,7 +185,6 @@ "RL=180 #Load Resistance(Ohm)\n", "RC=120 #Collector resistance(Ohm)\n", "\n", - "#Calculation\n", "VB=VCC*(R2/(R1+R2)) #Base voltage(V)\n", "VE=math.ceil(VB-VBE) #Emitter voltage(V)\n", "IE=VE/RE #Emitter current(A)\n", @@ -218,7 +198,6 @@ "Pout=0.225 #Output power as per example 12-3 (W)\n", "n=(Pout/Pdc)*100 #efficiency of stage\n", "\n", - "#Result\n", "print 'Power dissipation PDQ = ',PDQ,'W'\n", "print 'efficiency of stage n = ',round(n,2),'%'" ], @@ -248,10 +227,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 12.6.py\n", - "#What are the values of ICQ,VCEQ,rc in figure 12-13?\n", "\n", - "#Variable declaration\n", "VCC=12 #collector voltage(V)\n", "RE=16 #Emitter resistance(Ohm)\n", "R1=50.0 #Base resistance1 (Ohm)\n", @@ -259,7 +235,6 @@ "VBE=0.7 #Base-emitter voltage drop(V)\n", "RL=16 #Load Resistance(Ohm)\n", "\n", - "#Calculation\n", "VB=VCC*(R2/(R1+R2)) #Base voltage(V)\n", "VE=(VB-VBE) #Emitter voltage(V)\n", "IE=VE/RE #Emitter current(A)\n", @@ -267,7 +242,6 @@ "VCEQ=VCC-VE #collector-emitter voltage (V) \n", "re=RE*RL/(RE+RL) #ac emitter resistance(Ohm)\n", "\n", - "#Result\n", "print 'Collector current ICQ = ',ICQ*1000,'mA'\n", "print 'collector-emitter voltage VCEQ = ',VCEQ,'V'\n", "print 'ac collector resistance re = ',re,'Ohm'" @@ -299,10 +273,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 12.7.py\n", - "#Determine the ac saturation and cutoff points in figure 12-13 & find the circuit's MPP output voltage. \n", "\n", - "#Variable declaration\n", "VCC=12 #collector voltage(V)\n", "RE=16 #Emitter resistance(Ohm)\n", "R1=50.0 #Base resistance1 (Ohm)\n", @@ -310,19 +281,16 @@ "VBE=0.7 #Base-emitter voltage drop(V)\n", "RL=16 #Load Resistance(Ohm)\n", "\n", - "#values from previous example,\n", "ICQ=456 #collector current (mA)\n", "VCEQ=4.7 #collector-emitter voltage (V) \n", "re=8.0 #ac emitter resistance(Ohm)\n", "\n", - "#Calculation\n", "ic_sat=(1000*(VCEQ/re))+ICQ #ic(sarturation) (mA)\n", "VCE_cut=VCEQ+(ICQ*re)/1000 #VCE(cut-off) (V)\n", "MP1=ICQ*re/1000\n", "MP2=VCEQ\n", "MPP=2*(min(MP1,MP2)) #maximum peak-to-peak voltage (V)\n", "\n", - "#Result\n", "print 'ic(sarturation) = ',ic_sat/1000,'A'\n", "print 'VCE(cut-off) = ',VCE_cut,'V'\n", "print 'maximum peak-to-peak voltage MPP = ',MPP,'V'" @@ -354,22 +322,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 12.8.py\n", - "#What is the max transistor power dissipation & max output power?\n", "\n", - "#Variable declaration\n", "VCC=20 #collector voltage(V)\n", "R1=100.0 #Base resistance1 (Ohm)\n", "R2=100.0 #Base resistance2 (Ohm)\n", "VBE=0.7 #Base-emitter voltage drop(V)\n", "RL=8.0 #Load Resistance(Ohm)\n", "\n", - "#Calculation\n", "MPP=VCC #maximum peak-to-peak voltage (V)\n", "PD_max=MPP**2/(40*RL) #Maximum power dissipation(W)\n", "Pout_max=MPP**2/(8*RL) #Maximum output power(W)\n", "\n", - "#Result\n", "print 'Maximum power dissipation PD_max = ',PD_max,'W'\n", "print 'Maximum output power Pout_max = ',Pout_max,'W'" ], @@ -399,12 +362,9 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 12.9.py\n", - "#If the adjustabe resistor is 15 Ohm, what is the efficiency in preceding example?\n", "\n", "import math\n", "\n", - "#Variable declaration\n", "VCC=20 #collector voltage(V)\n", "R1=100.0 #Base resistance1 (Ohm)\n", "R2=100.0 #Base resistance2 (Ohm)\n", @@ -412,7 +372,6 @@ "RL=8.0 #Load Resistance(Ohm)\n", "Ra=15 #adjustable resistor(Ohm)\n", "\n", - "#Calculation\n", "VCEQ=VCC/2 #collector-emitter voltage (V) \n", "I_bias=VCC/(R1+R2+Ra) #bias current(mA)\n", "Ic_sat=VCEQ/RL #ic(sarturation) (mA)\n", @@ -423,7 +382,6 @@ "n=(Pout/Pdc)*100 #efficiency of stage\n", "\n", "\n", - "#Result\n", "print 'efficiency of stage n = ',round(n,2),'%'" ], "language": "python", @@ -451,17 +409,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 12.10.py\n", - "#What is the ICQ in figure 12-22 & maximum efficiency of the amplifier?\n", "\n", - "#Variable declaration\n", "VCC=20 #collector voltage(V)\n", "R1=3.9 #Base resistance1 (KOhm)\n", "R2=3.9 #Base resistance2 (KOhm)\n", "VBE=0.7 #Base-emitter voltage drop(V)\n", "RL=10.0 #Load Resistance(Ohm)\n", "\n", - "#Calculation\n", "VCEQ=VCC/2 #collector-emitter voltage (V) \n", "I_bias=(VCC-(2*VBE))/(R1+R2) #bias current(mA)\n", "Ic_sat=VCEQ/RL #ic(sarturation) (mA)\n", @@ -471,7 +425,6 @@ "Pout=VCC**2/(8*RL) #Output power (W)\n", "n=(Pout/Pdc)*100 #efficiency of stage\n", "\n", - "#Result\n", "print 'efficiency of stage n = ',round(n,2),'%'" ], "language": "python", @@ -499,18 +452,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 12.11.py\n", - "#Describe the action of figure 12-27?\n", "import math\n", "\n", - "#Variable declaration\n", "L=2*10**-6 #inductance (H)\n", "C=470*10**-12 #capacitance(F)\n", "\n", - "#Calculation\n", "fr=((2*math.pi)*((L*C)**0.5))**-1\n", "\n", - "#Result\n", "print 'Resonant frequency fr = ',round((fr*10**-6),2),'MHz'" ], "language": "python", @@ -538,25 +486,20 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 12.12.py\n", - "#If QL is 100 in figure 12-33, what is the band width of amplifier?\n", "import math\n", "\n", - "#Variable declaration\n", "fr=5.19*10**6 #frequency as per previous example(Hz)\n", "L=2*10**-6 #inductance (H)\n", "C=470*10**-12 #capacitance(F)\n", "QL=100 #quality factor of coil\n", "RL=1 #Load resistance(KOhm)\n", "\n", - "#Calculation\n", "XL=2*math.pi*fr*L #inductive impedance(Ohm)\n", "Rp=QL*XL/1000 #Eq. parallel resistance of coil(KOhm)\n", "rc=1000*Rp*RL/(Rp+RL) #ac collector resistance(Ohm)\n", "Q=rc/XL #Q of overall circuit\n", "BW=(fr/Q/1000) #band width of amplifier(KHz)\n", "\n", - "#Result\n", "print 'band width of amplifier BW = ',round(BW,2),'KHz'" ], "language": "python", @@ -584,20 +527,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 12.13.py\n", - "#In figure 12-33a, what is the worst-case power dissipation?\n", "\n", "import math # This will import math module\n", "\n", - "#Variable declaration\n", "VCC=15 #collector voltage(V)\n", "rc=867.0 #ac collector resistance as per preceding example (Ohm)\n", "\n", - "#Calculation\n", "MPP=2*VCC #Maximum peak-to-peak voltage(V)\n", "PD=1000*MPP**2/(40*rc) #worst-case power dissipation(mW)\n", "\n", - "#Result\n", "print 'Worst-case power dissipation PD = ',math.ceil(PD),'mW'" ], "language": "python", @@ -625,20 +563,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 12.14.py\n", - "#In circuit of figure 12-37 is to operate over range of 0 to 50 deg C. \n", - "#Find the maximum power rating of the transistor for the worst-case temperature.\n", "\n", - "#Variable declaration\n", "PD=625 #maximum power rating at 25 deg C(mW)\n", "D=5 #Derating factor(mW/deg C)\n", "TA=50 #ambient temperature(deg C)\n", "\n", - "#Calculation\n", "DP=D*(TA-25) #difference in power(mW) \n", "PD_max=PD-DP #maximum power rating(mW)\n", "\n", - "#Result\n", "print 'Maximum power rating PD_max = ',PD_max,'mW'" ], "language": "python", diff --git a/Electronic_Principles_/Chapter_13_New.ipynb b/Electronic_Principles_/Chapter_13_New.ipynb index 00c96741..2b92ce1a 100644 --- a/Electronic_Principles_/Chapter_13_New.ipynb +++ b/Electronic_Principles_/Chapter_13_New.ipynb @@ -27,17 +27,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 13.1.py\n", - "#JFET gate current is 1nA when the reverse gate voltage is 20 V. What is the Rin of this JFET?\n", "\n", - "#Variable declaration\n", "VG=20 #Gate voltage(V)\n", "IG=1*10**-9 #Gate current(A) \n", "\n", - "#Calculation\n", "Rin=VG/IG #input resistance(Ohm)\n", "\n", - "#Result\n", "print 'input resistance of JFET Rin = ',Rin/10**6,'MOhm'" ], "language": "python", @@ -65,18 +60,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 13.2.py\n", - "#Vp=6V and IDSS=100 mA. What is the ohmic resistance & gate-source cutoff voltage?\n", "\n", - "#Variable declaration\n", "Vp=6 #Pinch off voltage(V)\n", "IDSS=100*10**-3 #current drain to source with shorted gate(A)\n", "\n", - "#Calculation\n", "RDS=Vp/IDSS #Ohmic resistance(Ohm)\n", "VGS_off=-Vp #gate-source cutoff voltage(V)\n", "\n", - "#Result\n", "print 'Ohmic resistance RDS = ',RDS,'Ohm'\n", "print 'Gate-source cutoff VGS(off) = ',VGS_off,'V'" ], @@ -106,19 +96,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 13.3.py\n", - "#VGS(off)=-4V and IDSS=5mA\n", - "#Find VG & ID at the half cutoff point.\n", "\n", - "#Variable declaration\n", "VGS_off=-4 #gate-source cutoff voltage(V)\n", "IDSS=5 #current drain to source with shorted gate(mA)\n", "\n", - "#Calculation\n", "VGS=VGS_off/2 #gate voltage(V)\n", "ID=IDSS/4.0 #drain current(mA)\n", "\n", - "#Result\n", "print 'Gate voltage VGS = ',VGS,'V'\n", "print 'Drain current ID = ',ID,'mA'" ], @@ -148,19 +132,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 13.4.py\n", - "#VGS(off)=-8V and IDSS=16mA\n", - "#What are VG & ID at the half cutoff point?\n", "\n", - "#Variable declaration\n", "VGS_off=-8 #gate-source cutoff voltage(V)\n", "IDSS=16 #current drain to source with shorted gate(mA)\n", "\n", - "#Calculation\n", "VGS=VGS_off/2 #gate voltage(V)\n", "ID=IDSS/4.0 #drain current(mA)\n", "\n", - "#Result\n", "print 'Gate voltage VGS = ',VGS,'V'\n", "print 'Drain current ID = ',ID,'mA'" ], @@ -190,26 +168,19 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 13.5.py\n", - "#What is the VD in figure 13-8a?\n", "\n", - "#Variable declaration\n", "Vp=4 #pinchoff voltage(V)\n", "Vin=-10 #input voltage(V)\n", "RD=10.0 #drain resistor(KOhm)\n", "IDSS=10.0 #IDSS (mA)\n", "VDD=10.0 #Drain supply voltage(V)\n", "\n", - "#Calculation\n", - "#Befor point A,\n", "VGS_off=-Vp #VGS cutoff voltage(V)\n", "VD=-Vin #drain voltage(V)\n", - "#Between point A&B,\n", "ID_sat=VD/RD #saturation drain current(mA)\n", "RDS=Vp/IDSS #Ohmic resistance(Ohm)\n", "VD=VDD*RDS/(RDS+RD) #drain votage(V)\n", "\n", - "#Result\n", "print 'Drain voltage VD = ',round(VD,2),'V'" ], "language": "python", @@ -237,22 +208,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 13.6.py\n", - "#Find medium source resistance & VD.\n", "\n", - "#Variable declaration\n", "Vp=4 #pinchoff voltage(V)\n", "RD=2.0 #drain resistor(KOhm)\n", "RS=400 #source resistance(Ohm)\n", "IDSS=10.0 #IDSS (mA)\n", "VDD=30.0 #Drain supply voltage(V)\n", "\n", - "#Calculation\n", "RDS=1000*Vp/IDSS #Ohmic resistance(Ohm)\n", "ID=IDSS/4.0 #drain current(mA)\n", "VD=VDD-(ID*RD) #drain votage(V)\n", "\n", - "#Result\n", "print 'Ohmic resistance RDS = ',RDS,'Ohm'\n", "print 'drain voltage VD = ',VD,'V'" ], @@ -282,16 +248,11 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 13.7.py \n", - "#determine the range of VGS and ID Q point values, optimum source resistor.\n", "\n", - "#Variable declaration\n", "IDSS=20 #IDSS (mA)\n", "RS=270 #Source resistance (Ohm)\n", "\n", - "#Calculation\n", "VGS=-IDSS*RS #gate-source voltage(V)\n", - "#after drawing (0,0) and seond point,\n", "VGSQ_min=-0.8 #Q point minimum gate-source voltage(V)\n", "VGSQ_max=-2.1 #Q point maximum gate-source voltage(V)\n", "IDQ_min=2.8 #Q point minimum drain current(V)\n", @@ -303,7 +264,6 @@ "Rs_min=1000*VGS_off_min/ID_min #Minimum value for Rs(Ohm)\n", "Rs_max=1000*VGS_off_max/ID_max #Maximum value for Rs(Ohm)\n", "\n", - "#Result\n", "print 'Maximum value for Rs =',Rs_max,'Ohm'\n", "print 'Minimum value for Rs =',Rs_min,'Ohm'\n", "print 'Choose approximately mid point between these two.'" @@ -335,23 +295,18 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 13.8.py\n", - "#Draw the dc load line and Q point for figure 13-15a usng ideal methods.\n", "\n", - "#Variable declaration\n", "VS=10 #source voltage (V)\n", "RS=2.0 #source resistance(KOhm)\n", "VDD=30 #Drain supply voltage (V)\n", "RD=1.0 #Drain resistance(KOhm)\n", "\n", - "#Calculation\n", "ID=VS/Rs #Drain current(mA)\n", "VD=VDD-(ID*RD) #Drain voltage(V)\n", "VDS=VD-VS #Drain to source voltage (V)\n", "ID_sat=VDD/(RD+RS) #ID(dc-saturation) (mA)\n", "VDS_cut=VDD #VDS(cutoff) (V)\n", "\n", - "#Result\n", "print 'ID (saturation) = ',ID_sat,'mA'\n", "print 'VDS (cutoff) = ',VDS_cut,'V'" ], @@ -381,10 +336,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 13.9.py\n", - "#Find minimum & maximum Q point for JFET.\n", "\n", - "#Variable declaration\n", "IDSS=20 #IDSS (mA)\n", "RS=270 #Source resistance (Ohm)\n", "VDD=30 #Drain supply voltage (V)\n", @@ -392,17 +344,14 @@ "R1=1*10**6 #Gate resistor1(Ohm) \n", "R2=2*10**6 #Gate resistor2(Ohm) \n", "\n", - "#Calculation\n", "VG=-VDD*R1/(R1+R2) #gate-source voltage(V)\n", "ID=VG/RS #current for second point(mA)\n", "\n", - "#after drawing (0,0) and seond point,\n", "VGSQ_min=-0.4 #Q point minimum gate-source voltage(V)\n", "VGSQ_max=-2.4 #Q point maximum gate-source voltage(V)\n", "IDQ_min=5.2 #Q point minimum drain current(V)\n", "IDQ_max=6.3 #Q point maximum drain current(V)\n", "\n", - "#Result\n", "print 'Maximum value for VGS =',VGSQ_max,'V'\n", "print 'Minimum value for VGS =',VGSQ_min,'V'\n", "print 'Maximum value for ID =',IDQ_max,'mA'\n", @@ -436,19 +385,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 13.10.py\n", - "#What is the ID & VD in figure 13-19a?\n", "\n", - "#Variable declaration\n", "RS=3.0 #Source resistance (KOhm)\n", "VDD=15 #Drain supply voltage (V)\n", "RD=1.0 #Drain resistance(KOhm)\n", "\n", - "#Calculation\n", "ID=VDD/RS #drain current(mA)\n", "VD=VDD-(ID*RD) #drain voltage(V)\n", "\n", - "#Result\n", "print 'Drain current ID = ',ID,'mA'\n", "print 'Drain voltage VD = ',VD,'V'" ], @@ -478,20 +422,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 13.11.py\n", - "#In figure 13-19b, What is the VD & ID? \n", "\n", - "#Variable declaration\n", "RS=2.0 #Source resistance (KOhm)\n", "VDD=10 #Drain supply voltage (V)\n", "RD=1.0 #Drain resistance(KOhm)\n", "VBE=0.7 #BJT transistor drop(V)\n", "\n", - "#Calculation\n", "ID=((VDD/2)-VBE)/RS #drain current(mA)\n", "VD=VDD-(ID*RD) #drain voltage(V)\n", "\n", - "#Result\n", "print 'Drain current ID = ',ID,'mA'\n", "print 'Drain voltage VD = ',VD,'V'" ], @@ -521,18 +460,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 13.12.py\n", - "#IDSS=5mA and gm0=5000 uS, What is the value of VGS(off) and gm when VGS=-1V?\n", "\n", - "#Variable declaration\n", "IDSS=5.0 #IDSS current (mA)\n", "gm0=5000.0 #transconductance at VGS=0(uS)\n", "VGS=-1.0 #VGS (V)\n", - "#Calculation\n", "VGS_off=1000*-2*IDSS/gm0 #VGS (off) (V)\n", "gm=gm0*(1-(VGS/VGS_off)) #gm at VGS=-1V\n", "\n", - "#Result\n", "print 'VGS (Off) = ',VGS_off,'V'\n", "print 'gm = ',gm,'uS'" ], @@ -562,21 +496,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 13.13.py\n", - "#If gm=5000 uS in figure 13-23, what is the output voltage?\n", "\n", - "#Variable declaration\n", "RD=3.6 #drain resistance(KOhm)\n", "RL=10 #Load resistance(KOhm)\n", "gm=5000 #transconductance (uS)\n", "Vin=1 #input(mVpp)\n", "\n", - "#Calculation\n", "rd=RD*RL/(RD+RL) #ac drain resistance(KOhm)\n", "Av=gm*rd/1000 #voltage gain\n", "Vout=Av*Vin #Output voltage(V)\n", "\n", - "#Result\n", "print 'ac drain resistance rd = ',round(rd,2),'KOhm'\n", "print 'voltage gain Av = ',round(Av,2)\n", "print 'output voltage Vout = ',round(Vout,2),'mVpp'" @@ -608,21 +537,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 13.14.py\n", - "#If gm=2500 uS in figure 13-24, what is the output voltage of source follower?\n", "\n", - "#Variable declaration\n", "RS=1.0 #source resistance(KOhm)\n", "RL=1.0 #Load resistance(KOhm)\n", "gm=2500.0*10**-6 #transconductance (S)\n", "Vin=1 #input(mVpp)\n", "\n", - "#Calculation\n", "rs=1000*RS*RL/(RS+RL) #ac source resistance(Ohm)\n", "Av=gm*rs/(1+(gm*rs)) #voltage gain\n", "Vout=Av*Vin #Output voltage(V)\n", "\n", - "#Result\n", "print 'ac source resistance rs = ',round(rs,2),'Ohm'\n", "print 'voltage gain Av = ',round(Av,2)\n", "print 'output voltage Vout = ',round(Vout,2),'mVpp'" @@ -654,23 +578,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 13.15.py\n", - "#Figure 13-25 includes variable resistor of 1KOhm.\n", - "#If this is adjusted to 780 Ohm, what is the voltage gain?\n", "\n", - "#Variable declaration\n", "Ra=780 #Adjustaed resistance(Ohm)\n", "RS1=220 #source resistance(Ohm)\n", "VDD=30 #Drain supply voltage(V)\n", "RL=3 #Load resistance(KOhm)\n", "gm=2000.0*10**-6 #transconductance (S)\n", "\n", - "#Calculation\n", "RS=(RS1+Ra)/1000 #total source resistance(KOhm)\n", "rs=1000*RS*RL/(RS+RL) #ac source resistance(Ohm)\n", "Av=gm*rs/(1+(gm*rs)) #voltage gain\n", "\n", - "#Result\n", "print 'Ac source resistance rs = ',rs,'Ohm'\n", "print 'voltage gain Av = ',Av" ], @@ -700,10 +618,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 13.16.py\n", - "#In figure 13-26, What is the ID & Av? \n", "\n", - "#Variable declaration\n", "RS=2.2 #source resistance(Ohm)\n", "VDD=30 #Drain supply voltage(V)\n", "RL=3.3 #Load resistance(KOhm)\n", @@ -711,13 +626,11 @@ "R1=2*10**-6 #Base resistor 1(Ohm)\n", "R2=1*10**-6 #Base resistor 2(Ohm) \n", "\n", - "#Calculation\n", "VD=VDD*(R2/(R1+R2)) #drain voltage(V)\n", "ID=VD/RS #drain current(mA)\n", "rs=1000*RS*RL/(RS+RL) #ac source resistance(Ohm)\n", "Av=gm*rs/(1+(gm*rs)) #voltage gain\n", "\n", - "#Result\n", "print 'Ac source resistance rs = ',rs/1000,'KOhm'\n", "print 'voltage gain Av = ',round(Av,2)" ], @@ -747,11 +660,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 13.17.py\n", - "#A JFET shunt switch has RD = 10 KOhm, IDSS=10 mA, and VGS(Off)=-2V. If vin =10 mVpp, \n", - "#what are output voltages & on-off ratio?\n", "\n", - "#Variable declaration\n", "RD=10.0 #Drain resistance(KOhm)\n", "R1=0.2 #resistance(KOhm)\n", "IDSS=10.0 #IDSS current(mA)\n", @@ -759,13 +668,11 @@ "gm=3500.0*10**-6 #transconductance (S)\n", "Vin=10.0 #input voltage (mVpp)\n", "\n", - "#Calculation\n", "RDS=-VGS_off/IDSS #Ohmic resistance(Ohm)\n", "Vout_on=Vin*RDS/(RD+R1) #Output voltage when JFET is on(V)\n", "Vout_off=Vin #Output voltage when JFET is off(V)\n", "ratio=Vout_off/Vout_on #on-off ratio\n", "\n", - "#Result\n", "print 'output voltage Vout = ',round(Vout_on,2),'mVpp'\n", "print 'on-off ratio = ',ratio" ], @@ -795,10 +702,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 13.18.py\n", - "#What are output voltages? Resistance of 10 MOhm when JFET is off, What is the on-off ratio?\n", "\n", - "#Variable declaration\n", "RD=10.0 #Drain resistance(KOhm)\n", "R1=0.2 #resistance(KOhm)\n", "R2=10*10**6 #resistance(Ohm)\n", @@ -807,12 +711,10 @@ "gm=3500.0*10**-6 #transconductance (S)\n", "Vin=10.0 #input voltage (mVpp)\n", "\n", - "#Calculation\n", "Vout_on=Vin*(RD/(RD+R1)) #Output voltage when JFET is on(V)\n", "Vout_off=Vin*(RD/R2) #Output voltage when JFET is off(V)\n", "ratio=Vout_on/Vout_off/1000 #on-off ratio\n", "\n", - "#Result\n", "print 'output voltage Vout when on = ',round(Vout_on,2),'mVpp'\n", "print 'output voltage Vout when off = ',Vout_off*10**6,'uVpp'\n", "print 'on-off ratio = ',round(ratio,2)" @@ -844,20 +746,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 13.19.py\n", - "#The square wave on the gate has frequency of 20KHz. what is frequency of the chopped output?\n", - "#If RDS = 50 Ohm, what is the peak value of chopped output?\n", "\n", - "#Variable declaration\n", "fout=20 #frequency(KHz)\n", "RDS=50.0 #Ohmic resistance(Ohm)\n", "RL=10*10**3 #Load resistance(Ohm)\n", "Vin=100 #input voltage (mV)\n", "\n", - "#Calculation\n", "Vpeak=Vin*RL/(RL+RDS) #peak voltage(V)\n", "\n", - "#Result\n", "print 'Outout Vpeak = ',round(Vpeak,2),'mV'" ], "language": "python", diff --git a/Electronic_Principles_/Chapter_14_New.ipynb b/Electronic_Principles_/Chapter_14_New.ipynb index 9d13545e..d16f054a 100644 --- a/Electronic_Principles_/Chapter_14_New.ipynb +++ b/Electronic_Principles_/Chapter_14_New.ipynb @@ -27,10 +27,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 14.1.py\n", - "#A D-MOSFET has VGS_Off=-3V and IDSS = 6mA. What will the ID when VGS equals -1V,-2V, 0V,1V and 2V ?\n", "\n", - "#Variable declaration\n", "VGS_off=-3.0 #Gate-source cutoff voltage(V)\n", "IDSS=6 #IDSS current(mA) \n", "VGS1=-1 #VGS voltage(V)\n", @@ -39,7 +36,6 @@ "VGS4=1\n", "VGS5=2\n", "\n", - "#Calculation\n", "ID1=IDSS*((1-(VGS1/VGS_off))**2)\n", "ID2=IDSS*((1-(VGS2/VGS_off))**2)\n", "ID3=IDSS*((1-(VGS3/VGS_off))**2)\n", @@ -47,7 +43,6 @@ "ID5=IDSS*((1-(VGS5/VGS_off))**2)\n", "\n", "\n", - "#Result\n", "print 'Drain current ID1 = ',round(ID1,2),'mA'\n", "print 'Drain current ID2 = ',round(ID2,2),'mA'\n", "print 'Drain current ID3 = ',ID3,'mA'\n", @@ -83,11 +78,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 14.2.py\n", - "#The D-MOSFET has VGS(off) =-2V, IDSS=4mA and gm0=2000 uS. \n", - "#What is the circuit's output voltage?\n", "\n", - "#Variable declaration\n", "VGS_off=-2.0 #Gate-source cutoff voltage(V)\n", "IDSS=4 #IDSS current(mA) \n", "gm0=2000*10**-6 #transconductance(S)\n", @@ -97,13 +88,11 @@ "RL=10.0 #Load resistance(KOhm)\n", "Vin=20 #input voltage(mV)\n", "\n", - "#Calculation\n", "VDS=VDD-(IDSS*RD) #Drain-source voltage(V)\n", "rd=RD*RL/(RD+RL) #ac drain resistance(KOhm) \n", "Av=gm0*rd*1000 #voltage gain\n", "Vout=Vin*Av #output voltage (mV)\n", "\n", - "#Result\n", "print 'Output voltage Vout = ',round(Vout,2),'mV'" ], "language": "python", @@ -131,10 +120,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 14.3.py\n", - "#What is the output voltage in figure 14-14a?\n", "\n", - "#Variable declaration\n", "VGS_on=4.5 #Gate-source voltage(V)\n", "ID_on=75 #ID current(mA) \n", "RDS=6 #Ohmic resistance(Ohm)\n", @@ -142,14 +128,10 @@ "RD=1.0 #Drain resistance(KOhm)\n", "RL=10.0 #Load resistance(KOhm)\n", "\n", - "#Calculation\n", "ID_sat=VDD/RD #drain saturation current(mA)\n", - "#VGS is high,\n", "Vout1=VDD*(RDS/(RDS+(RD*1000)))#output voltage when VGS is high(V)\n", - "#VGS is low, \n", "Vout2=VDD #output voltage when VGS is low(V) \n", "\n", - "#Result\n", "print 'output voltage when VGS is high = ',round(Vout1,2),'V'\n", "print 'output voltage when VGS is low = ',Vout2,'V'" ], @@ -179,18 +161,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 14.4.py\n", - "#What is the LED current ib figure 14-15?\n", "\n", - "#Variable declaration\n", "ID=20 #ID current as per previous example(mA) \n", "Vled=2 #Led drop(V)\n", "RD=1.0 #Drain resistance(KOhm)\n", "\n", - "#Calculation\n", "ID=(VDD-Vled)/RD #drain current considering LED drop\n", "\n", - "#Result\n", "print 'drain current considering LED drop ID = ',ID,'mA'" ], "language": "python", @@ -218,17 +195,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 14.5.py\n", - "#What does the circuit of figure 14-16a do if a coil current of 30 mA or more closes the relay contacts? \n", "\n", - "#Variable declaration\n", "Rrc=500.0 #Resistance of relay(V)\n", "VDD=24 #drain supply voltage(V)\n", "\n", - "#Calculation\n", "ID_sat=VDD/Rrc #drain saturation current(A)\n", "\n", - "#Result\n", "print 'Drain saturaion current ID(sat) = ',ID_sat*1000,'mA'" ], "language": "python", @@ -256,19 +228,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 14.6.py\n", - "#What is the output voltage in figure 14-20a when the input is low & high?\n", "\n", - "#Variable declaration\n", "VDD=20.0 #drain supply voltage (V)\n", "RD=10*10**3 #drain resistance(Ohm)\n", "RDS=50.0 #Ohmic resistance(Ohm)\n", "\n", - "#Calculation\n", "Vout1=VDD #Output voltage when i/p is low (V)\n", "Vout2=VDD*RDS/(RDS+RD) #Output voltage when i/p is high (V)\n", "\n", - "#Result\n", "print 'Output voltage when input is low Vout1 = ',Vout1,'V'\n", "print 'Output voltage when input is high Vout2 = ',round((Vout2*1000),2),'mV'" ], @@ -298,19 +265,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 14.7.py\n", - "#What is the output voltage in figure 14-20b?\n", "\n", - "#Variable declaration\n", "VDD=10.0 #drain supply voltage (V)\n", "RD=2*10**3 #drain resistance(Ohm)\n", "RDS=500.0 #Ohmic resistance(Ohm)\n", "\n", - "#Calculation\n", "Vout1=VDD #Output voltage when i/p is low (V)\n", "Vout2=VDD*RDS/(RDS+RD) #Output voltage when i/p is high (V)\n", "\n", - "#Result\n", "print 'Output voltage when input is low Vout1 = ',Vout1,'V'\n", "print 'Output voltage when input is high Vout2 = ',Vout2,'V'" ], @@ -340,13 +302,10 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 14.8.py\n", - "#The MOSFET of figure 14-22a have RDS(ON)=100 Ohm, RDS(off)=1 MOhm. What does output waveform look like?\n", "\n", "import matplotlib.pyplot as plt\n", "%pylab inline\n", "\n", - "#calculation & plotting\n", "print 'Input signal switches from 0 to 15 V at pt. A & 15 to 0 V at pt. B'\n", "x=[1,2,3,4,5,6,7,8,9,10]\n", "y=[0,0,0,15,15,15,15,0,0,0]\n", @@ -408,21 +367,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 14.9.py\n", - "#What is the current through the motor winding of figure 14-28?\n", "\n", - "#Variable declaration\n", "VDD=30.0 #drain supply voltage (V)\n", "RD=30 #drain resistance(Ohm)\n", "RDS=1.95 #Ohmic resistance(Ohm)\n", "ID_on=2 #ID for MOSFET on (A)\n", "\n", - "#Calculation\n", "ID_sat=VDD/RD #drain saturation current(A)\n", - "#ID_satVB so diode breaks over\n", "I1=1000*Vin/R #diode current ideally(mA)\n", "I2=1000*(Vin-0.7)/R #diode current with second approx.(mA)\n", - "#To get more accurate answer, as per figure 15-3e , Voltage=0.9V when I=150mA\n", "I3=1000*(Vin-0.9)/R #diode current more accurately(mA)\n", "\n", - "#Result\n", "print 'Diode current ideally ID1 = ',I1,'mA'\n", "print 'Diode current with second approx. ID2 = ',I2,'mA'\n", "print 'Diode current more accurately ID3 = ',I3,'mA'" @@ -74,19 +67,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 15.2.py\n", - "#The diode of figure 15-5 has Ih of 4 mA. Vin is increased to 15 V ,then decreased to open the diode. \n", - "#What is the input voltage that opens the diode?\n", "\n", - "#Variable declaration\n", "Ih=4*10**-3 #holding current(mA)\n", "R=100.0 #resistance (Ohm)\n", "Vs=15 #input voltage (V)\n", "\n", - "#Calculation\n", "Vin=0.7+(Ih*R) #new input voltage(V)\n", "\n", - "#Result\n", "print 'New input voltage Vin = ',Vin,'V'" ], "language": "python", @@ -114,23 +101,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 15.3.py\n", - "#Figure 15-6a shows a sawtooth generator. \n", - "#when capacitor voltage reaches +10V, diode breaks over. \n", - "#What is RC time constant for capacitor charging? \n", - "#What is frequency of the sawtooth wave if its period is approximately 20% of time constant.\n", "\n", - "#Variable declaration\n", "R=2.0*10**3 #resistance (Ohm)\n", "C=0.02*10**-6 #capacitance (F)\n", "VB=10 #breakdown voltage(V)\n", "\n", - "#Calculation\n", "RC=R*C #Time constant(s)\n", "T=0.2*RC #period (s)\n", "f=T**-1 #frequency(Hz) \n", "\n", - "#Result\n", "print 'time constant RC = ',RC*10**6,'us'\n", "print 'Period T = ',T*10**6,'us'\n", "print 'Frequency = ',f/1000,'KHz'" @@ -162,22 +141,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 15.4.py\n", - "#In figure 15-14 the SCR has a trigger voltage 0.75 V and trigger current 7mA. What is Vin that turns SCR on?\n", - "#If Ih is 6mA, what is supply voltage that turns it off?\n", "\n", - "#Variable declaration\n", "It=7*10**-3 #trigger current(mA)\n", "R1=100.0 #resistance (Ohm)\n", "R2=1*10**3 #resistance (Ohm)\n", "Vt=0.75 #trigger voltage (V)\n", "Ih=6*10**-3 #holding current(mA)\n", "\n", - "#Calculation\n", "Vin=Vt+(It*R2) #minimum input voltage(V)\n", "VCC=0.7+(Ih*R1) #supply voltage for turning of SCR(V)\n", "\n", - "#Result\n", "print 'Minimum input voltage Vin = ',Vin,'V'\n", "print 'supply voltage for turning of SCR VCC = ',VCC,'V'" ], @@ -207,10 +180,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 15.5.py\n", - "#What is peak output voltage? What is frequency of sawtooth wave if its period is approximately 20% of time constant?\n", "\n", - "#Variable declaration\n", "IGT=200*10**-6 #trigger current(mA)\n", "VGT=1 #trigger voltage(V) \n", "R1=900.0 #resistance (Ohm)\n", @@ -220,7 +190,6 @@ "Ih=6*10**-3 #holding current(mA)\n", "R=1*10**3 #Resistance (Ohm) \n", "\n", - "#Calculation\n", "RTH=R1*R2/(R1+R2) #Thevenin resistance (Ohm)\n", "Vin=VGT+(IGT*RTH) #input voltage needed to trigger(V)\n", "Vp=10*Vin #Output voltage at SCR firing point(V)\n", @@ -228,7 +197,6 @@ "T=RC*0.2 #period (s)\n", "f=1/T #frequency (Hz)\n", "\n", - "#Result\n", "print 'peak output voltage Vpeak = ',Vp,'V'\n", "print 'time constant RC = ',RC*10**6,'us'\n", "print 'Period T = ',T*10**6,'us'\n", @@ -262,20 +230,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 15.6.py\n", - "#Calculate supply voltage that turns on crowbar of figure 15-21.\n", "\n", - "#Variable declaration\n", "Vz=5.6 #breakdown voltage(V)\n", "VGT1=0.75 #trigger voltage (V) \n", "VGT2=1.5 #worst case maximum trigger voltage(V) \n", "Vz2=6.16 #break down voltage with 10% tolerance (V)\n", "\n", - "#Calculation\n", "VCC1=Vz+VGT1 #supply voltage(V) \n", "VCC2=VGT2+Vz2 #Over voltage (V)\n", "\n", - "#Result\n", "print 'supply voltage VCC1 = ',VCC1,'V'\n", "print 'supply over voltage VCC2 = ',VCC2,'V'" ], @@ -305,18 +268,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 15.7.py\n", - "#Using figure 15-22a, find approximate firing angle & conduction angle when R=26KOhm\n", "\n", "import math # This will import math module\n", "\n", - "#Variable declaration\n", "C=0.1*10**-6 #capacitance (F)\n", "f=60 #frequency (Hz)\n", "R=26*10**3 #resistance(KOhm)\n", "Vm=120 #input ac voltage(V)\n", "\n", - "#Calculation\n", "XC=(2*math.pi*f*C)**-1 #capacitive reactance(Ohm)\n", "ZT=((R**2)+(XC**2))**0.5 #impedance (Ohm)\n", "thetaz=math.atan2(-XC,R)*180/math.pi #angle (deg)\n", @@ -324,7 +283,6 @@ "VC=IC*XC #voltage across C(V)\n", "thetac=180+thetaz #conduction angle(deg)\n", "\n", - "#Result\n", "print 'Capacitor reactance XC = ',round((XC/1000),2),'KOhm'\n", "print 'impedance ZT = ',round((ZT/1000),2),'KOhm'\n", "print 'firing angle = ',round(thetaz,2),'deg'\n", @@ -362,19 +320,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 15.8.py\n", - "#If the triac has fired, what is the approximate current through 22Ohm resistor?\n", "\n", - "#Variable declaration\n", "C=1*10**-6 #capacitance (F)\n", "R1=22.0 #resistance (Ohm)\n", "R2=82*10**3 #resistance(KOhm)\n", "Vs=75 #input voltage(V)\n", "\n", - "#Calculation\n", "I=Vs/R1 #current through 22Ohm resistor (A)\n", "\n", - "#Result\n", "print 'current through 22Ohm resistor I = ',round(I,2),'A'" ], "language": "python", @@ -402,18 +355,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 15.9.py\n", - "#diac has breakover voltage of 32V. \n", - "#If the triac has a trigger voltage of 1V and a trigger current of 10mA, what is the Vc that triggers the triac?\n", "\n", - "#Variable declaration\n", "Vdb=32.0 #diac break down voltage (V)\n", "VTT=1 #triac trigger voltage(V)\n", "\n", - "#Calculation\n", "Vin=VTT+Vdb #input voltage for triggering triac\n", "\n", - "#Result\n", "print 'input voltage for triggering triac vin = ',Vin,'V'" ], "language": "python", diff --git a/Electronic_Principles_/Chapter_16_New.ipynb b/Electronic_Principles_/Chapter_16_New.ipynb index 82ef1353..847a3379 100644 --- a/Electronic_Principles_/Chapter_16_New.ipynb +++ b/Electronic_Principles_/Chapter_16_New.ipynb @@ -27,23 +27,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 16.1.py\n", - "#Amplifier has midband Av of 200, with cutoff frequencies f1=20 Hz, f2=20KHz. \n", - "#Find voltage gain for 5Hz & 200KHz input frequencies.\n", "\n", - "#Variable declaration\n", "Avm=200 #mid band voltage gain\n", "f1=20 #cutoff frequency1 (Hz)\n", "f2=20*10**3 #cutoff frequency2 (Hz)\n", "fi1=5 #input frequency1(Hz)\n", "fi2=200*10**3 #input frequency2(Hz)\n", "\n", - "#Calculation\n", "Av=0.707*Avm #voltage gain at either frequency\n", "Av1=Avm/(1+(f1/fi1)**2)**0.5 #voltage gain for 5Hz\n", "Av2=Avm/(1+(fi2/f2)**2)**0.5 #voltage gain for 200KHz\n", "\n", - "#Result\n", "print 'voltage gain for 200KHz = ',round(Av1,2)\n", "print 'voltage gain for 5Hz = ',round(Av2,2)" ], @@ -73,18 +67,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 16.2.py\n", - "#In figure 16-4a OP-Amp with midband Av of 100,000. \n", - "#if f2=10Hz, then what does frequency response look like? \n", "\n", - "#Variable declaration\n", "Avm=100000 #mid band voltage gain\n", "f2=10 #cutoff frequency (Hz)\n", "\n", - "#Calculation\n", "Av=0.707*Avm #voltage gain at cutoff frequency\n", "\n", - "#Result\n", "print 'voltage gain for 10Hz = ',Av" ], "language": "python", @@ -112,12 +100,9 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 16.3.py\n", - "#In preceding example , what is Av if input frequencies: 100Hz, 1KHz, 10KHZ, 100 KHz, 1MHz?\n", "\n", "import math # This will import math module\n", "\n", - "#Variable declaration\n", "Avm=100000 #mid band voltage gain\n", "fc=10.0 #cutoff frequency (Hz)\n", "fi1=100.0 #input frequency1(Hz)\n", @@ -126,14 +111,12 @@ "fi4=100*10**3 #input frequency4(Hz)\n", "fi5=1*10**6 #input frequency5(Hz)\n", "\n", - "#Calculation\n", "Av1=Avm/(1+(fi1/fc)**2)**0.5 #voltage gain for 100Hz\n", "Av2=Avm/(1+(fi2/fc)**2)**0.5 #voltage gain for 1KHz\n", "Av3=Avm/(1+(fi3/fc)**2)**0.5 #voltage gain for 10KHz\n", "Av4=Avm/(1+(fi4/fc)**2)**0.5 #voltage gain for 100KHz\n", "Av5=Avm/(1+(fi5/fc)**2)**0.5 #voltage gain for 1MHz\n", "\n", - "#Result\n", "print 'voltage gain for 100Hz = ',math.ceil(Av1)\n", "print 'voltage gain for 1KHz = ',math.ceil(Av2)\n", "print 'voltage gain for 10KHz = ',math.ceil(Av3)\n", @@ -169,24 +152,19 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 16.4.py\n", - "#Calculate power gain(dB) for following values Ap=1,2,4,8\n", "\n", "import math # This will import math module\n", "\n", - "#Variable declaration\n", "Ap1=1 #power gain1\n", "Ap2=2 #power gain2\n", "Ap3=4 #power gain3\n", "Ap4=8 #power gain4\n", "\n", - "#Calculation\n", "Ap_db1=10*math.log10(Ap1) #decibel power gain(dB)\n", "Ap_db2=10*math.log10(Ap2) #decibel power gain(dB)\n", "Ap_db3=10*math.log10(Ap3) #decibel power gain(dB)\n", "Ap_db4=10*math.log10(Ap4) #decibel power gain(dB)\n", "\n", - "#Result\n", "print 'decibel power gain Ap1(dB) = ',Ap_db1,'dB'\n", "print 'decibel power gain Ap2(dB) = ',round(Ap_db2,2),'dB'\n", "print 'decibel power gain Ap3(dB) = ',round(Ap_db3,2),'dB'\n", @@ -222,24 +200,19 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 16.5.py\n", - "#Calculate decibel power gain for following values Ap=1,0.5,0.25,0.125\n", "\n", "import math # This will import math module\n", "\n", - "#Variable declaration\n", "Ap1=1 #power gain1\n", "Ap2=0.5 #power gain2\n", "Ap3=0.25 #power gain3\n", "Ap4=0.125 #power gain4\n", "\n", - "#Calculation\n", "Ap_db1=10*math.log10(Ap1) #decibel power gain(dB)\n", "Ap_db2=10*math.log10(Ap2) #decibel power gain(dB)\n", "Ap_db3=10*math.log10(Ap3) #decibel power gain(dB)\n", "Ap_db4=10*math.log10(Ap4) #decibel power gain(dB)\n", "\n", - "#Result\n", "print 'decibel power gain Ap1(dB) = ',Ap_db1,'dB'\n", "print 'decibel power gain Ap2(dB) = ',round(Ap_db2,2),'dB'\n", "print 'decibel power gain Ap3(dB) = ',round(Ap_db3,2),'dB'\n", @@ -275,24 +248,19 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 16.6.py\n", - "#Calculate decibel power gain for following values Ap=1,10,100,1000\n", "\n", "import math # This will import math module\n", "\n", - "#Variable declaration\n", "Ap1=1 #power gain1\n", "Ap2=10 #power gain2\n", "Ap3=100 #power gain3\n", "Ap4=1000 #power gain4\n", "\n", - "#Calculation\n", "Ap_db1=10*math.log10(Ap1) #decibel power gain(dB)\n", "Ap_db2=10*math.log10(Ap2) #decibel power gain(dB)\n", "Ap_db3=10*math.log10(Ap3) #decibel power gain(dB)\n", "Ap_db4=10*math.log10(Ap4) #decibel power gain(dB)\n", "\n", - "#Result\n", "print 'decibel power gain Ap1(dB) = ',Ap_db1,'dB'\n", "print 'decibel power gain Ap2(dB) = ',Ap_db2,'dB'\n", "print 'decibel power gain Ap3(dB) = ',Ap_db3,'dB'\n", @@ -328,24 +296,19 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 16.7.py\n", - "#Calculate decibel power gain for following values Ap=1,0.1,0.01,0.001\n", "\n", "import math # This will import math module\n", "\n", - "#Variable declaration\n", "Ap1=1 #power gain1\n", "Ap2=0.1 #power gain2\n", "Ap3=0.01 #power gain3\n", "Ap4=0.001 #power gain4\n", "\n", - "#Calculation\n", "Ap_db1=10*math.log10(Ap1) #decibel power gain(dB)\n", "Ap_db2=10*math.log10(Ap2) #decibel power gain(dB)\n", "Ap_db3=10*math.log10(Ap3) #decibel power gain(dB)\n", "Ap_db4=10*math.log10(Ap4) #decibel power gain(dB)\n", "\n", - "#Result\n", "print 'decibel power gain Ap1(dB) = ',Ap_db1,'dB'\n", "print 'decibel power gain Ap2(dB) = ',Ap_db2,'dB'\n", "print 'decibel power gain Ap3(dB) = ',Ap_db3,'dB'\n", @@ -381,24 +344,18 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 16.8.py\n", - "#What is total voltage gain in decibels?\n", - "#find decibel voltage gain of each stage and total.\n", "\n", "import math # This will import math module\n", "\n", - "#Variable declaration\n", "Av1=100 #voltage gain1\n", "Av2=200 #voltage gain2\n", "\n", - "#Calculation\n", "Av=Av1*Av2 #total voltage gain\n", "Av_db=20*math.log10(Av) #decibel total voltage gain(dB)\n", "Av_db1=20*math.log10(Av1) #decibel voltage gain(dB)\n", "Av_db2=20*math.log10(Av2) #decibel voltage gain(dB)\n", "Avt_db=Av_db1+Av_db2 #decibel total voltage gain(dB)\n", "\n", - "#Result \n", "print 'decibel total voltage gain Av(dB) = ',round(Av_db,2),'dB'\n", "print 'decibel voltage gain Av1(dB) = ',Av_db1,'dB'\n", "print 'decibel voltage gain Av2(dB) = ',round(Av_db2,2),'dB'\n", @@ -432,23 +389,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 16.9.py\n", - "#Impedance matched stages with R=50 Ohm. \n", - "#Find total decibel gain, total power gain & total voltage gain.\n", "\n", "import math # This will import math module\n", "\n", - "#Variable declaration\n", "Av_db1=23 #voltage gain1(dB)\n", "Av_db2=36 #voltage gain2(dB)\n", "Av_db3=31 #voltage gain3(dB)\n", "\n", - "#Calculation\n", "Avt_db=Av_db1+Av_db2+Av_db3 #decibel total voltage gain(dB)\n", "Ap=10**(Avt_db/10) #power gain by taking antilog\n", "Avt=10**(Avt_db/20.0) #total voltage gain by taking antilog\n", "\n", - "#Result \n", "print 'decibel total voltage gain Avt(dB) = ',Avt_db,'dB'\n", "print 'power gain Ap = ',Ap\n", "print 'total voltage gain Avt = ',math.ceil(Avt)" @@ -480,20 +431,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 16.10.py\n", - "#In preceding example, What is ordinary Av of each stage?\n", "\n", - "#Variable declaration\n", "Av_db1=23 #voltage gain1(dB)\n", "Av_db2=36 #voltage gain2(dB)\n", "Av_db3=31 #voltage gain3(dB)\n", "\n", - "#Calculation\n", "Av1=10**(Av_db1/20.0) #voltage gain of stage 1 by taking antilog\n", "Av2=10**(Av_db2/20.0) #voltage gain of stage 2 by taking antilog\n", "Av3=10**(Av_db3/20.0) #voltage gain of stage 3 by taking antilog\n", "\n", - "#Result \n", "print 'voltage gain of stage 1 : Av1 = ',round(Av1,2)\n", "print 'voltage gain of stage 1 : Av2 = ',round(Av2,2)\n", "print 'voltage gain of stage 1 : Av3 = ',round(Av3,2)" @@ -525,16 +471,11 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 16.11.py\n", - "#Output of an amplifier is 24 dBm. What is output power?\n", "\n", - "#Variable declaration\n", "Ap_dbm=24 #power gain(dBm)\n", "\n", - "#Calculation\n", "P=10**(Ap_dbm/10.0) #Output power(mW)\n", "\n", - "#Result \n", "print 'Output power P = ',round(P,2),'mW'" ], "language": "python", @@ -562,18 +503,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 16.12.py\n", - "#Output of an amplifier is -34 dBV. What is output voltage?\n", "\n", "import math # This will import math module\n", "\n", - "#Variable declaration\n", "Av_dbV=-34 #voltage gain(dBV)\n", "\n", - "#Calculation\n", "V=10**(Av_dbV/20.0) #Output voltage(V)\n", "\n", - "#Result \n", "print 'Output voltage V = ',math.ceil(V*1000),'mV'" ], "language": "python", @@ -601,18 +537,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 16.13.py\n", - "#OP-Amp gives midband Av of 100,000. \n", - "#a cutoff f=10Hz, and roll off rate of 20 dB per decade. find ordinary voltage gain at 1MHz.\n", "\n", - "#Variable declaration\n", "Avm=100000 #mid band voltage gain\n", "f2=10 #cutoff frequency (Hz)\n", "\n", - "#Calculation\n", "Av_db=20*math.log10(Avm) #decibel total voltage gain(dB)\n", "\n", - "#Result\n", "print 'voltage gain for 10Hz = ',Av_db1,'dB'\n", "print 'At 1MHz, due to roll off factor of 20 dB, voltage gain reduce to 0 dB'" ], @@ -642,18 +572,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 16.14.py\n", - "#Draw ideal bode plot for lag circuit of figure 16-18a.\n", "import math\n", "\n", - "#Variable declaration\n", "R=5*10**3 #resistance(Ohm)\n", "C=100*10**-12 #Capacitance (F)\n", "\n", - "#Calculation\n", "f2=(2*math.pi*R*C)**-1 #cutoff frequency (Hz)\n", "\n", - "#Result\n", "print 'cutoff frequency f2 = ',round((f2/1000),2),'KHz'\n", "print 'After f2, response rolls off at rate of 20 dB/decade'" ], @@ -683,19 +608,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 16.15.py\n", - "#dc amplifier stage has a midband Av of 100. \n", - "#If RTH facing bypass capacitor is 2KOhm. What is the ideal bode plot?\n", "import math\n", "\n", - "#Variable declaration\n", "R=2*10**3 #resistance(Ohm)\n", "C=500*10**-12 #Capacitance (F)\n", "\n", - "#Calculation\n", "f2=(2*math.pi*R*C)**-1 #cutoff frequency (Hz)\n", "\n", - "#Result\n", "print 'cutoff frequency f2 = ',round((f2/1000),2),'KHz'\n", "print 'After f2, response rolls off at rate of 20 dB/decade up to funity of 15.9 MHz'" ], @@ -725,21 +644,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 16.17.py\n", - "#The amplifier of figure 16-22a has a Av of 100,000.\n", "import math\n", "\n", - "#Variable declaration\n", "R=5.3*10**3 #resistance(Ohm)\n", "C=30*10**-12 #Capacitance (F)\n", "Av=100000 #voltage gain\n", "\n", - "#Calculation\n", "Cout_M=C #input Miller Capacitance (F)\n", "Cin_M=Av*C #input Miller Capacitance (F)\n", "f2=(2*math.pi*R*Cin_M)**-1 #cutoff frequency (Hz)\n", "\n", - "#Result\n", "print 'cutoff frequency f2 = ',round(f2,3),'Hz'" ], "language": "python", @@ -767,16 +681,11 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 16.18.py\n", - "#What is upper cutoff frequency for circuit shown in figure 16-24a?\n", "\n", - "#Variable declaration\n", "TR=1*10**-6 #rise time(s)\n", "\n", - "#Calculation\n", "f2=0.35/TR #cutoff frequency (Hz)\n", "\n", - "#Result\n", "print 'cutoff frequency f2 = ',f2/1000,'KHz'" ], "language": "python", @@ -804,11 +713,8 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 16.19.py\n", - "#calculate low-cutoff frequency for each coupling and by-pass capacitor. \n", "import math\n", "\n", - "#Variable declaration\n", "re=22.7 #from past dc calculation (example:9-5)(Ohm)\n", "VCC=10 #collector voltage(V)\n", "RC=3.6 #Collector resistance (KOhm)\n", @@ -823,7 +729,6 @@ "C3=2.2*10**-6 #output capacitance(F)\n", "C2=10*10**-6 #emitter capacitance(F)\n", "\n", - "#Calculation\n", "Rinb=B*re/1000 #Rin(base) (KOhm)\n", "Ri=RG+((R1**-1)+(Rinb**-1)+(R2**-1))**-1 #thevenin resistance facing i/p capacitor\n", "f1i=((2*math.pi*Ri*C1)**-1)/1000 #input cutoff frequency (Hz)\n", @@ -833,7 +738,6 @@ "f1z=((2*math.pi*Zout*C2)**-1)/1000 #cutoff frequency for bypass circuit (Hz)\n", "\n", "\n", - "#Result\n", "print 'input cutoff frequency f1 = ',round(f1i,2),'Hz'\n", "print 'output cutoff frequency f1 = ',round(f1o,2),'Hz'\n", "print 'cutoff frequency for bypass circuit f1 = ',round(f1z,2),'Hz'" @@ -865,13 +769,9 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 16.20.py\n", - "#calculate high cutoff frequency for base bypass and collector bypass circuit. \n", - "#B=150 & Cstray=10pF.\n", "\n", "import math # This will import math module\n", "\n", - "#Variable declaration\n", "re=22.7 #from past dc calculation (example:9-5)(Ohm)\n", "VCC=10 #collector voltage(V)\n", "RC=3.6 #Collector resistance (KOhm)\n", @@ -886,7 +786,6 @@ "Cs=10*10**-12 #stray capacitance(F)\n", "\n", "\n", - "#Calculation\n", "Rinb=B*re/1000 #Rin(base) (KOhm)\n", "Ce1=((2*math.pi*re*fT)**-1) #capacitance Ce'(F)\n", "rc=RC*RL/(RC+RL) #collector resistance(KOhm) \n", @@ -901,7 +800,6 @@ "R2=1000*RC*RL/(RC+RL) #resistance facing this capacitance(Ohm)\n", "f21=((2*math.pi*R2*C2)**-1) #collector bypass circuit cutoff frequency (Hz)\n", "\n", - "#Result\n", "print 'base bypass circuit cutoff frequency f2 = ',round((f2/10**6),2),'MHz'\n", "print 'collector bypass circuit cutoff frequency f21 = ',round((f21/10**6),2),'MHz'" ], @@ -931,11 +829,8 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 16.21.py\n", - "#Determine input-coupling & output coupling circuit low-frequency cutoff points.\n", "import math\n", "\n", - "#Variable declaration\n", "re=22.7 #from past dc calculation (example:9-5)(Ohm)\n", "RC=3.6 #Collector resistance (KOhm)\n", "R1=2*10**6 #Base resistance1 (Ohm)\n", @@ -947,13 +842,11 @@ "Cout=10*10**-6 #Cout capacitance(F)\n", "\n", "\n", - "#Calculation\n", "Rthi=RG+((R1**-1)+(R2**-1))**-1 #Thevenin resistance facing input coupling capacitor resistance (Ohm)\n", "f1=((2*math.pi*Rthi*Cin)**-1) #base bypass circuit cutoff frequency (Hz)\n", "Rtho=RD+RL #Thevenin resistance facing output coupling capacitor resistance (Ohm)\n", "f2=((2*math.pi*Rtho*Cout)**-1) #base bypass circuit cutoff frequency (Hz)\n", "\n", - "#Result\n", "print 'base bypass circuit cutoff frequency f1 = ',round(f1,2),'Hz'\n", "print 'collector bypass circuit cutoff frequency f2 = ',round(f2,2),'Hz'" ], @@ -983,12 +876,8 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 16.22.py\n", - "#In figure 16-32, capacitances are: Ciss=60 pF, Coss=25 pF, Crss=5 pF.\n", - "#gm=97mS then find high frequency cut off values for gate & drain circuits.\n", "import math\n", "\n", - "#Variable declaration\n", "Ciss=60 #Capacitance Ciss (pF)\n", "Coss=25 #Capacitance Coss (pF)\n", "Crss=5 #Capacitance Crss (pF)\n", @@ -999,7 +888,6 @@ "RD=150 #resiatance(Ohm)\n", "RL=1*10**3 #load resiatance(Ohm)\n", "\n", - "#Calculation\n", "Cgd=Crss #Internal Capacitance Cgd (pF)\n", "Cgs=Ciss-Crss #Internal Capacitance Cgs (pF)\n", "Cds=Coss-Crss #Internal Capacitance Cds (pF)\n", @@ -1013,7 +901,6 @@ "C1=Cds+Cout_M #drain bypass capacitance(pF)\n", "f21=((2*math.pi*rd*C1*10**-12)**-1) #drain bypass cutoff frequency (Hz)\n", "\n", - "#Result\n", "print 'Gate bypass cutoff frequency = ',round(f2*10**-6,2),'MHz'\n", "print 'Drain bypass cutoff frequency = ',round(f21*10**-6,2),'MHz'" ], diff --git a/Electronic_Principles_/Chapter_17_New.ipynb b/Electronic_Principles_/Chapter_17_New.ipynb index 3de7e129..a6647813 100644 --- a/Electronic_Principles_/Chapter_17_New.ipynb +++ b/Electronic_Principles_/Chapter_17_New.ipynb @@ -27,18 +27,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 17.1.py\n", - "#What are the ideal currents & voltages in figure 17-6a?\n", "\n", - "#Variable declaration\n", "VCC=15 #supply voltage(V)\n", "RE=7.5 #Emitter resistance(KOhm)\n", "\n", - "#Calculation\n", "IT=VCC/RE #tail current (mA)\n", "IE=IT/2 #emitter current (mA)\n", "\n", - "#Result\n", "print 'tail current = ',IT,'mA'\n", "print 'emitter current = ',IE,'mA'" ], @@ -68,21 +63,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 17.2.py\n", - "#Recalculate the currents and voltages for figure 17-6a using second approximation.\n", "\n", - "#Variable declaration\n", "VCC=15 #supply voltage(V)\n", "RE=7.5 #Emitter resistance(KOhm)\n", "VBE=0.7 #base-emitter voltage(V)\n", "RC=5 #collector resistance(KOhm)\n", "\n", - "#Calculation\n", "IT=(VCC-VBE)/RE #tail current (mA)\n", "IE=IT/2 #emitter current (mA)\n", "VC=VCC-(IE*RC) #collector quiescent voltage(V) \n", "\n", - "#Result\n", "print 'tail current = ',round(IT,2),'mA'\n", "print 'emitter current = ',round(IE,2),'mA'\n", "print 'collector quiescent voltage VC = ',round(VC,2),'V'" @@ -114,24 +104,18 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 17.3.py\n", - "#What are the ideal currents & voltages in figure 17-7a?\n", "\n", - "#Variable declaration\n", "VCC=12.0 #supply voltage(V)\n", "RE=5.0 #Emitter resistance(KOhm)\n", "RC=3.0 #collector resistance(KOhm)\n", "\n", - "#Calculation\n", "IT=VCC/RE #tail current (mA)\n", "IE=IT/2 #emitter current (mA)\n", "VC=VCC-(IE*RC) #collector quiescent voltage(V) \n", - "#with second approximation,\n", "IT1=(VCC-VBE)/RE #tail current (mA)\n", "IE1=IT1/2 #emitter current (mA)\n", "VC1=VCC-(IE1*RC) #collector quiescent voltage(V) \n", "\n", - "#Result\n", "print 'tail current = ',IT,'mA'\n", "print 'emitter current = ',IE,'mA'\n", "print 'collector quiescent voltage VC = ',VC,'V'\n", @@ -171,10 +155,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 17.4.py\n", - "#In figure 17-11, what is the ac output voltage? If B = 300, what is input impedance?\n", "\n", - "#Variable declaration\n", "VCC=12.0 #supply voltage(V)\n", "RE=7.5 #Emitter resistance(KOhm)\n", "RC=5.0 #collector resistance(KOhm)\n", @@ -182,13 +163,11 @@ "Vin=1 #input ac voltage(mV)\n", "B=300 #current gain\n", "\n", - "#Calculation\n", "re=25/IE #ac emitter resistance(Ohm)\n", "Av=1000*RC/re #voltage gain\n", "Vout=Av*Vin #Output voltage(mV)\n", "Zinb=2*B*re #input impedance of diff amp(Ohm)\n", "\n", - "#Result\n", "print 'voltage gain Av = ',Av\n", "print 'Output voltage Vout = ',Vout,'mV'\n", "print 'input impedance of diff amplifier, Zin(base) = ',Zinb/1000,'KOhm'" @@ -220,10 +199,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 17.5.py\n", - "#Repeat preceding example using second approximation to calculate ICQ.\n", "\n", - "#Variable declaration\n", "VCC=12.0 #supply voltage(V)\n", "RE=7.5 #Emitter resistance(KOhm)\n", "RC=5.0 #collector resistance(KOhm)\n", @@ -231,13 +207,11 @@ "Vin=1 #input ac voltage(mV)\n", "B=300 #current gain\n", "\n", - "#Calculation\n", "re=25/IE #ac emitter resistance(Ohm)\n", "Av=1000*RC/re #voltage gain\n", "Vout=Av*Vin #Output voltage(mV)\n", "Zinb=2*B*re #input impedance of diff amp(Ohm)\n", "\n", - "#Result\n", "print 'voltage gain Av = ',Av\n", "print 'Output voltage Vout = ',Vout,'mV'\n", "print 'input impedance of diff amplifier, Zin(base) = ',round((Zinb/1000),2),'KOhm'" @@ -269,10 +243,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 17.6.py\n", - "#Repeat example 17-4 for v2=1mV & v1=0.\n", "\n", - "#Variable declaration\n", "VCC=12.0 #supply voltage(V)\n", "RE=7.5 #Emitter resistance(KOhm)\n", "RC=5.0 #collector resistance(KOhm)\n", @@ -280,13 +251,11 @@ "V2=1 #input ac voltage(mV)\n", "B=300 #current gain\n", "\n", - "#Calculation\n", "re=25/IE #ac emitter resistance(Ohm)\n", "Av=1000*RC/re #voltage gain\n", "Vout=Av*V2 #Output voltage(mV)\n", "Zinb=2*B*re #input impedance of diff amp(Ohm)\n", "\n", - "#Result\n", "print 'V2 input is at inverting input, So, ideally same as previous case.'\n", "print 'Voltage gain Av = ',Av\n", "print 'Output voltage Vout = ',Vout,'mV'\n", @@ -320,10 +289,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 17.7.py\n", - "#What is ac output voltage in figure 17-12? if B=300, what is input impedance?\n", "\n", - "#Variable declaration\n", "VCC=15.0 #supply voltage(V)\n", "RC=1.0**10**6 #collector resistance(Ohm)\n", "RE=1.0**10**6 #emitter resistance(Ohm)\n", @@ -331,7 +297,6 @@ "Vin=7 #input ac voltage(mV)\n", "B=300 #current gain\n", "\n", - "#Calculation\n", "IT=VCC/RE #tail current (uA)\n", "IE=IT/2 #emitter current (uA)\n", "re=25/IE/1000 #ac emitter resistance(Ohm)\n", @@ -339,7 +304,6 @@ "Vout=Av*Vin #Output voltage(V)\n", "Zinb=2*B*re #input impedance of diff amp(MOhm)\n", "\n", - "#Result\n", "print 'Voltage gain Av = ',Av\n", "print 'Output voltage Vout = ',Vout/1000,'V'\n", "print 'input impedance of diff amplifier, Zin(base) = ',Zinb,'MOhm'" @@ -371,11 +335,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 17.8.py\n", - "#The diff amp of figure 17-17 has Av=200, Iin(bias)=3uA, Iin(off) =0.5 uA. and Vin(off)= 1mV. What is output error voltage?\n", - "#what is output error voltage?\n", "\n", - "#Variable declaration\n", "VCC=15.0 #supply voltage(V)\n", "RC=5.0*10**3 #collector resistance(Ohm)\n", "RE=7.5*10**3 #emitter resistance(Ohm)\n", @@ -386,18 +346,15 @@ "Iino =0.5*10**-6 #Iin(off) (A) \n", "Vino=1.0 #Vin(off) (mV)\n", "\n", - "#Calculation\n", "V1err=RB*Iinb*1000 #dc error input1 (mV)\n", "V2err=RB*(Iino/2)*1000 #dc error input2 (mV)\n", "V3err=Vino #dc error input3 (mV)\n", "Verror=Av*(V1err+V2err+V3err) #output error voltage(mV)\n", - "#if matching base resistor is used,\n", "V1err1=0 #dc error input1 (mV)\n", "V2err1=RB*Iino*1000 #dc error input2 (mV)\n", "V3err1=Vino #dc error input3 (mV)\n", "Verror1=Av*(V1err1+V2err1+V3err1) #output error voltage(mV)\n", "\n", - "#Result\n", "print 'output error voltage Verror = ',Verror,'mV'\n", "print 'output error voltage Verror = ',Verror1,'mV'" ], @@ -427,10 +384,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 17.9.py\n", - "#The diff amp of figure 17-18 has Av=300, Iin(bias)=80nA, Iin(off) =20 nA. and Vin(off)= 5mV. What is output error voltage?\n", "\n", - "#Variable declaration\n", "VCC=15.0 #supply voltage(V)\n", "RC=1.0*10**6 #collector resistance(Ohm)\n", "RE=1.0*10**6 #emitter resistance(Ohm)\n", @@ -441,13 +395,11 @@ "Iino=20*10**-9 #Iin(off) (A) \n", "Vino=5.0 #Vin(off) (mV)\n", "\n", - "#Calculation\n", "V1err=0 #dc error input1 (mV)\n", "V2err=RB*(Iino/2)*1000 #dc error input2 (mV)\n", "V3err=Vino #dc error input3 (mV)\n", "Verror=Av*(V1err+V2err+V3err) #output error voltage(mV)\n", "\n", - "#Result\n", "print 'output error voltage Verror = ',Verror/1000,'V'" ], "language": "python", @@ -475,20 +427,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 17.10.py\n", - "#In figure 17-2, what is common-node voltage gain & output voltage?\n", "\n", - "#Variable declaration\n", "VCC=15.0 #supply voltage(V)\n", "RC=1.0*10**6 #collector resistance(Ohm)\n", "RE=1.0*10**6 #emitter resistance(Ohm)\n", "Vin=1 #input ac voltage(mV)\n", "\n", - "#Calculation\n", "Av_CM=RC/(2*RE) #common mode voltage gain\n", "Vout=Av_CM*Vin #output voltage(mV) \n", "\n", - "#Result \n", "print 'common mode voltage gain : Av(CM) = ',Av_CM\n", "print 'Output voltage Vout = ',Vout,'mV'" ], @@ -518,21 +465,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 17.11.py\n", - "#In figure 17-22 has Av=150, Av(CM)=0.5, Vin =1 mV. \n", - "#If base leads are picking up a common-mode signal of 1mV, what is the output voltage?\n", "\n", - "#Variable declaration\n", "Vin=1 #input ac voltage(mV)\n", "Av=150 #voltage gain\n", "Av_CM=0.5 #common mode voltage gain\n", "\n", - "#Calculation\n", "Vout1=Av*Vin #output voltage1(mV)\n", "Vout2=Av_CM*Vin #output voltage2(mV)\n", "Vout=Vout1+Vout2 #output volatge(mV)\n", "\n", - "#Result\n", "print 'output voltage Vout1 = ',Vout1,'mV'\n", "print 'output voltage Vout2 = ',Vout2,'mV'\n", "print 'output voltage Vout = ',Vout,'mV'" @@ -564,22 +505,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 17.12.py\n", - "#OP-AMP with Av=2,00,000 & CMRR(dB)=90dB. what is the common mode voltage gain? \n", - "#If desired & common-mode signal is of 1uV, what is the output voltage?\n", "\n", - "#Variable declaration\n", "CMRR_dB=90 #CMRR(dB)\n", "Av=200000 #voltage gain\n", "Vin=1*10**-6 #input voltage(V)\n", "\n", - "#Calculation\n", "CMRR=10**(CMRR_dB/20.0) #CMRR \n", "Av_CM=Av/CMRR #common mode voltage gain \n", "Vout1=Av*Vin #desired output: voltage1(V)\n", "Vout2=Av_CM*Vin #common mode output: voltage2(V)\n", "\n", - "#Result\n", "print 'output voltage Vout1 = ',Vout1,'V'\n", "print 'output voltage Vout2 = ',round((Vout2*10**6),2),'uV'\n", "print 'see, desired output is much larger than common mode output.'" @@ -611,10 +546,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 17.13.py\n", - "#What is load voltage in figure 17-32a when RL=15KOhm?\n", "\n", - "#Variable declaration\n", "VCC=15.0 #supply voltage(V)\n", "RC=7.5*10**3 #collector resistance(Ohm)\n", "RE=7.5*10**3 #emitter resistance(Ohm)\n", @@ -622,13 +554,11 @@ "re=25 #as per example 17-4 (Ohm) \n", "RL=15*10**3 #load resistance(KOhm)\n", "\n", - "#Calculation\n", "Av=RC/re #voltage gain\n", "Vout=Av*V1/1000 #output voltage(V) \n", "RTH=2*RC #Thevenin resistance(Ohm)\n", "VL=(RL/(RL+RTH))*Vout #load voltage(V)\n", "\n", - "#Result \n", "print 'Load voltage VL = ',VL,'V'" ], "language": "python", @@ -656,17 +586,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 17.14.py\n", - "#An ammeter is used for load resistance. find current through the ammeter?\n", "\n", - "#Variable declaration\n", "RL=15.0 #load resistance as per previous example(Ohm)\n", "VL=3 #load voltage as per previous example(V)\n", "\n", - "#Calculation\n", "iL=VL/RL #load current(mA)\n", "\n", - "#Result\n", "print 'Load current iL = ',iL,'mA'" ], "language": "python", diff --git a/Electronic_Principles_/Chapter_18_New.ipynb b/Electronic_Principles_/Chapter_18_New.ipynb index 1fbf3765..a06bb044 100644 --- a/Electronic_Principles_/Chapter_18_New.ipynb +++ b/Electronic_Principles_/Chapter_18_New.ipynb @@ -27,17 +27,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 18.1.py\n", - "#How much inverting input voltage required to drive the 741C of figure 18-11a into negative saturation?\n", "\n", - "#Variable declaration\n", "Vout=13.5 #As per figure 18-7b(V)\n", "Aov=100000 #open loop voltage gain\n", "\n", - "#Calculation\n", "V2=Vout/Aov #required input voltage(V)\n", "\n", - "#Result\n", "print 'Required input voltage V2 = ',V2*10**6,'uV'" ], "language": "python", @@ -65,16 +60,11 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 18.2.py\n", - "#What is the CMRR of a 741C when the input frequency is 100KHz?\n", "\n", - "#Variable declaration\n", "CMRR_dB=40 #As per figure 18-7a at 100KHz(dB)\n", "\n", - "#Calculation\n", "CMRR=10**(CMRR_dB/20)\n", "\n", - "#Result\n", "print 'Common-mode rejection ratio = ',CMRR" ], "language": "python", @@ -102,16 +92,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 18.3.py\n", - "#what is the open loop voltage gain of 741C when input frequency is 1KHz? 10KHZ? 100KHz?\n", "\n", - "#Variable declaration / Calculation\n", "\n", "Av1=1000 #Voltage gain as per figure 18-7c for 1KHZ\n", "Av10=100 #Voltage gain as per figure 18-7c for 10KHZ\n", "Av100=10 #Voltage gain as per figure 18-7c for 100KHZ\n", "\n", - "#Result\n", "print 'Voltage gain for 1KHZ = ',Av1\n", "print 'Voltage gain for 1KHZ = ',Av10\n", "print 'Voltage gain for 1KHZ = ',Av100" @@ -143,17 +129,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 18.4.py\n", - "#the output changes to 0.25 V in 0.1us. What is te slew rate of the op amp?\n", "\n", - "#Variable declaration\n", "Vout=0.25 #output changes in 0.1us (V)\n", "t=0.1 #time for output change(us) \n", "\n", - "#Calculation\n", "SR=Vout/t #slew rate(V/us)\n", "\n", - "#Result\n", "print 'Slew rate SR = ',SR,'V/us'" ], "language": "python", @@ -181,17 +162,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 18.5.py\n", - "#The LF411A has a slew ratwe of 15 V/us. what is power bandwidth for peak output voltage of 10V?\n", "import math\n", - "#Variable declaration\n", "SR=15 #slew rate(V/us)\n", "Vp=10 #Peak output voltage(V)\n", "\n", - "#Calculation\n", "fmax=1000*SR/(2*math.pi*Vp) #power bandwidth (KHz) \n", "\n", - "#Result\n", "print 'Power bandwidth = ',round(fmax),'KHz'" ], "language": "python", @@ -219,23 +195,18 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 18.6.py\n", - "#What is the power bandwidth for each of following?\n", "\n", "import math\n", "\n", - "#Variable declaration\n", "SR1=0.5 #Slew rate1(V/us)\n", "SR2=5 #Slew rate2(V/us)\n", "SR3=50 #Slew rate3(V/us)\n", "Vp=8 #peak voltage(V)\n", "\n", - "#Calculation\n", "fmax1=1000*SR1/(2*math.pi*Vp) #power bandwidth1 (KHz) \n", "fmax2=1000*SR2/(2*math.pi*Vp) #power bandwidth2 (KHz) \n", "fmax3=SR3/(2*3*math.pi*Vp) #power bandwidth3 (MHz) \n", "\n", - "#Result\n", "print 'Power bandwidth1 = ',math.ceil(fmax1),'KHz'\n", "print 'Power bandwidth2 = ',math.ceil(fmax2),'KHz'\n", "print 'Power bandwidth3 = ',math.ceil(fmax3),'MHz'" @@ -267,22 +238,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 18.7.py\n", - "#What are closed-loop voltage gain and bandwidth? what is output voltage at 1KHz & 1MHz?\n", "\n", - "#Variable declaration\n", "Vin=10 #input voltage(mV)\n", "Rf=75 #feedback path resistance Rf (KOhm)\n", "R1=1.5 #inverting input resistance R1(KOhm)\n", "Funity=1 #Funity (MHz)\n", "\n", - "#Calculation\n", "Av_CL=-Rf/R1 #closed loop voltage gain\n", "f2_CL1=Funity/-Av_CL #closed loop bandwidth1(KHz)\n", "Vout1=Av_CL*Vin #output voltage1(mV)\n", "Vout2=-Vin #output voltage2(mV)\n", "\n", - "#Result\n", "print 'Output voltage for 1KHz = ',Vout1,'mVpp'\n", "print 'Output voltage for 1MHz = ',Vout2,'mVpp'" ], @@ -312,10 +278,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 18.8.py\n", - "#What is output voltage in figure 18-17 when Vin=0?\n", "\n", - "#Variable declaration\n", "Vin=10 #input voltage(mV)\n", "Rf=75 #feedback path resistance Rf (KOhm)\n", "R1=1.5 #inverting input resistance R1(KOhm)\n", @@ -325,14 +288,12 @@ "Av=50 #voltage gain \n", "RB1=0 #resistance at noninverting input(KOhm) \n", "\n", - "#Calculation\n", "RB2=R1*Rf/(Rf+R1) #thevenin resistance at inverting input(KOhm) \n", "V1err=(RB1-RB2)*Iinb*10**6 #dc error input1 (mV)\n", "V2err=(RB1+RB2)*(Iino/2)*10**6 #dc error input2 (mV)\n", "V3err=Vino #dc error input3 (mV)\n", "Verror=Av*(abs(V1err)+V2err+V3err) #output error voltage(mV)\n", "\n", - "#Result\n", "print 'output error voltage Verror = ',round(Verror,2),'mV'" ], "language": "python", @@ -360,11 +321,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 18.9.py\n", - "#Iin(bias)=500nA, Iin(off) =200 nA. and Vin(off)= 6mV. \n", - "#Calculate output voltage for Vin=0.\n", "\n", - "#Variable declaration\n", "Vin=10 #input voltage(mV)\n", "Rf=75 #feedback path resistance Rf (KOhm)\n", "R1=1.5 #inverting input resistance R1(KOhm)\n", @@ -374,14 +331,12 @@ "Av=50 #voltage gain \n", "RB1=0 #resistance at noninverting input(KOhm) \n", "\n", - "#Calculation\n", "RB2=R1*Rf/(Rf+R1) #thevenin resistance at inverting input(KOhm) \n", "V1err=(RB1-RB2)*Iinb*10**6 #dc error input1 (mV)\n", "V2err=(RB1+RB2)*(Iino/2)*10**6 #dc error input2 (mV)\n", "V3err=Vino #dc error input3 (mV)\n", "Verror=Av*(abs(V1err)+V2err+V3err) #output error voltage(mV)\n", "\n", - "#Result\n", "print 'output error voltage Verror = ',round(Verror,2),'mV'" ], "language": "python", @@ -409,24 +364,19 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 18.10.py\n", - "#In figure 18-22a, What is closed-loop voltage gain, bandwidth and output voltage at 250KHz?\n", "\n", "import math\n", "\n", - "#Variable declaration\n", "Vin=50 #input voltage(mV)\n", "Rf=3.9*10**3 #feedback path resistance Rf (Ohm)\n", "R1=100 #inverting input resistance R1(Ohm)\n", "Funity=1*10**6 #Funity (Hz)\n", "\n", - "#Calculation\n", "Av_CL=1+(Rf/R1) #closed loop voltage gain\n", "f2_CL1=Funity/Av_CL #closed loop bandwidth1(KHz)\n", "Av_CL1=math.ceil(10**(12/20.0)) #Av for 12 dB at 250 KHz \n", "Vout=Av_CL1*Vin #output voltage(mV)\n", "\n", - "#Result\n", "print 'Output voltage for 250KHz = ',Vout,'mVpp'" ], "language": "python", @@ -454,11 +404,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 18.11.py\n", - "#Iin(bias)=500nA, Iin(off) =200 nA. and Vin(off)= 6mV. \n", - "#What is the output voltage?\n", "\n", - "#Variable declaration\n", "Vin=10 #input voltage(mV)\n", "Rf=3.9*10**3 #feedback path resistance Rf (Ohm)\n", "R1=100 #inverting input resistance R1(Ohm)\n", @@ -468,14 +414,12 @@ "Av=40 #voltage gain \n", "RB1=0 #resistance at noninverting input(KOhm) \n", "\n", - "#Calculation\n", "RB2=R1*Rf/(Rf+R1) #thevenin resistance at inverting input(KOhm) \n", "V1err=(RB1-RB2)*Iinb #dc error input1 (mV)\n", "V2err=(RB1+RB2)*(Iino/2) #dc error input2 (mV)\n", "V3err=Vino #dc error input3 (mV)\n", "Verror=Av*(abs(V1err)+V2err+V3err) #output error voltage(mV)\n", "\n", - "#Result\n", "print 'output error voltage Verror = ',Verror*1000,'mV'" ], "language": "python", @@ -503,10 +447,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 18.12.py\n", - "#Three audio signals drive the summing amplifier of figure 18-25. What is the ac output voltage?\n", "\n", - "#Variable declaration\n", "Vin1=100*10**-3 #input voltage1(V)\n", "Vin2=200*10**-3 #input voltage2(V)\n", "Vin3=300*10**-3 #input voltage3(V)\n", @@ -515,14 +456,12 @@ "R2=10.0 #inverting input resistance R2(KOhm)\n", "R3=50.0 #inverting input resistance R3(KOhm)\n", "\n", - "#Calculation\n", "Av1_CL=-Rf/R1 #closed loop voltage gain\n", "Av2_CL=-Rf/R1 #closed loop voltage gain\n", "Av3_CL=-Rf/R1 #closed loop voltage gain\n", "Vout=Av1_CL*Vin1+Av2_CL*Vin2+Av3_CL*Vin3 #output voltage1(mV)\n", "RB2=(R1**-1+R2**-1+R3**-1+Rf**-1)**-1 #thevenin resistance at inverting input(KOhm) \n", "\n", - "#Result\n", "print 'Output voltage = ',Vout,'Vpp'\n", "print 'thevenin resistance at inverting input RB2 = ',round(RB2,2),'KOhm'" ], @@ -552,20 +491,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 18.13.py\n", - "#An ac voltage source of 10 mVpp with an internal resistance of 100 KOhm drives voltage follower. \n", - "#RL is 1 Ohm. Find output voltage & bandwidth.\n", "\n", - "#Variable declaration\n", "Vin=10 #ac voltage source (mVpp)\n", "Av=1 #voltage gain\n", "Funity=1 #unity frequency (MHz) \n", "\n", - "#Calculation\n", "Vout=Av*Vin #output voltage(V) \n", "f2_CL=Funity #bandwidth(MHz) \n", "\n", - "#Result \n", "print 'Output voltage = ',Vout,'mVpp'\n", "print 'Bandwidth f2(CL) = ',f2_CL,'MHz'" ], @@ -595,20 +528,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 18.14.py\n", - "#In voltage follower of figure 18-26a, the output voltage across the 1 Ohm load is 9.99 mV. \n", - "#calculate closed loop output impedance.\n", "\n", - "#Variable declaration\n", "RL=1.0 #load resistance(Ohm)\n", "Vout=9.99 #load voltage(mV)\n", "Vz=0.01 #voltage across Zout(CL) (mV)\n", "\n", - "#Calculation\n", "iout=Vout/RL #load current(mA)\n", "Zout_CL=Vz/iout #output impedance(Ohm)\n", "\n", - "#Result\n", "print 'Load current iout = ',iout,'mA'\n", "print 'closed loop output impedance Zout(CL) = ',round(Zout_CL,3),'Ohm'" ], diff --git a/Electronic_Principles_/Chapter_19_New.ipynb b/Electronic_Principles_/Chapter_19_New.ipynb index 6edb4ee9..2cb36ac1 100644 --- a/Electronic_Principles_/Chapter_19_New.ipynb +++ b/Electronic_Principles_/Chapter_19_New.ipynb @@ -27,24 +27,18 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 19.1.py\n", - "#Calculate feedback fraction, the ideal closed-loop voltage gain, the percent error & exact closed loop voltage gain. \n", - "#AVOL= 100,000 for 741C. \n", "\n", - "#Variable declaration\n", "Vin=50 #input voltage(mV)\n", "Rf=3.9 #feedback path resistance Rf (KOhm)\n", "R1=0.1 #inverting input resistance R1(KOhm)\n", "AVOL=100000 #open loop voltage gain\n", "\n", - "#Calculation\n", "B=R1/(Rf+R1) #feedback fraction\n", "Av=B**-1 #closed loop voltage gain\n", "Err=100/(1+AVOL*B) #percent error (%)\n", "Av1=Av-((Av/100)*Err) #closed loop voltage gain1\n", "Av2=AVOL/(1+AVOL*B) #closed loop voltage gain2\n", "\n", - "#Result\n", "print 'closed loop voltage gain by approach 1 = ',round(Av1,2)\n", "print 'closed loop voltage gain by approach 2 = ',round(Av2,2)" ], @@ -74,10 +68,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 19.2.py\n", - "#741C has an Rin of 2MOhm and an RCM of 200MOhm. What is closed loop input impedance?\n", "\n", - "#Variable declaration\n", "Vin=50 #input voltage(mV)\n", "Rf=3.9*10**3 #feedback path resistance Rf (Ohm)\n", "R1=100 #inverting input resistance R1(Ohm)\n", @@ -86,12 +77,9 @@ "Rin=2*10**6 #open loop input resistance(Ohm)\n", "RCM=200*10**6 #common mode input resistance(Ohm)\n", "\n", - "#Calculation\n", "Zin_CL=(1+(AVOL*B))*Rin #closed loop input impedance(Ohm)\n", - "#for answer>100MOHM use equation 19-8\n", "Zin_CL1=RCM*Zin_CL/(RCM+Zin_CL) #closed loop input impedance(Ohm)\n", "\n", - "#Result\n", "print 'closed loop input impedance Zin(CL) = ',round((Zin_CL1/10**6),2),'MOhm'" ], "language": "python", @@ -119,19 +107,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 19.3.py\n", - "#calculate the closed loop output impedance in figure 19-6.\n", - "#AVOL of 100,000 and Rout of 75 Ohm.\n", "\n", - "#Variable declaration \n", "Rout=75 #open loop output resistance(Ohm)\n", "AVOL=100000 #open loop voltage gain\n", "B=0.025 #feedback fraction\n", "\n", - "#Calculation\n", "Zout_CL=Rout/(1+AVOL*B) #closed loop input impedance(Ohm)\n", "\n", - "#Result\n", "print 'closed loop output impedance Zout(CL) = ',round(Zout_CL,2),'Ohm'" ], "language": "python", @@ -159,19 +141,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 19.4.py\n", - "#Amplifier has an open loop total harmonic distortion of 7.5%. \n", - "#what is the closed loop total harmonic distribution?\n", "\n", - "#Variable declaration\n", "THD=7.5 #open loop total harmonic distortion (%)\n", "AVOL=100000 #open loop voltage gain\n", "B=0.025 #feedback fraction\n", "\n", - "#Calculation\n", "THD_CL=THD/(1+AVOL*B) #closed loop total harmonic distortion (%)\n", "\n", - "#Result\n", "print 'Closed loop total harmonic distortion THD(CL) = ',round(THD_CL,3),'%'" ], "language": "python", @@ -199,17 +175,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 19.5.py\n", - "#In figure 19-9, what is output voltage for input frequency 1 KHz?\n", "\n", - "#Variable declaration\n", "Iin=1 #input current(mA)\n", "Rf=5 #feedback path resistance Rf (KOhm)\n", "\n", - "#Calculation\n", "Vout=-(Iin*Rf) #Output voltage at 1KHz (Vpp) \n", "\n", - "#Result\n", "print 'Output ac voltage at 1KHz Vout = ',Vout,'Vpp'" ], "language": "python", @@ -237,19 +208,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 19.6.py\n", - "#What are the closed loop input & output impedances in figure 19-9?\n", "\n", - "#Variable declaration \n", "Rout=75.0 #open loop output resistance(Ohm)\n", "AVOL=100000 #open loop voltage gain\n", "Rf=5.0*10**3 #feedback path resistance(Ohm)\n", "\n", - "#Calculation \n", "Zin_CL=Rf/(1+AVOL) #closed loop input impedance(Ohm)\n", "Zout_CL=Rout/(1+AVOL) #closed loop input impedance(Ohm)\n", "\n", - "#Result\n", "print 'closed loop input impedance Zin(CL) = ',round(Zin_CL,2),'Ohm'\n", "print 'closed loop output impedance Zout(CL) = ',round(Zout_CL,5),'Ohm'" ], @@ -279,21 +245,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 19.7.py\n", - "#what is IL & PL ? What happens if RL = 4 Ohm?\n", "\n", - "#Variable declaration\n", "Vin=2 #input voltage(Vrms)\n", "RL1=2 #load resistance (KOhm)\n", "R1=1 #inverting input resistance R1(KOhm)\n", "RL2=4 #load resistance(KOhm)\n", "\n", - "#Calculation\n", "iout=Vin/R1 #output current (mA)\n", "PL1=(iout**2)*RL1 #load power for 2 Ohm (W) \n", "PL2=(iout**2)*RL2 #load power for 4 Ohm (W) \n", "\n", - "#Result\n", "print 'load power for 2 Ohm = ',PL1,'W'\n", "print 'load power for 4 Ohm = ',PL2,'W'" ], @@ -323,25 +284,20 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 19.8.py\n", - "#what is IL & PL? What happens if RL = 2 Ohm?\n", "\n", "import math\n", "\n", - "#Variable declaration\n", "Iin=1.5*10**-3 #input current(mA)\n", "RL1=1 #load resistance (KOhm)\n", "R1=1 #inverting input resistance R1(KOhm)\n", "RL2=2 #load resistance (KOhm)\n", "Rf=1*10**3 #feedback path resistance(Ohm)\n", "\n", - "#Calculation\n", "Ai=math.ceil(1+(Rf/R1)) #current gain\n", "iout=Iin*Ai #output current (mA)\n", "PL1=(iout**2)*RL1 #load power for 1 Ohm (W) \n", "PL2=(iout**2)*RL2 #load power for 2 Ohm (W) \n", "\n", - "#Result\n", "print 'load power for 2 Ohm = ',round(PL1,2),'W'\n", "print 'load power for 4 Ohm = ',round(PL2,2),'W'" ], @@ -371,17 +327,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 19.9.py\n", - "#LF411A with (1+AvolB)=1000 and f2(OL)=160 Hz, what is closed loop bandwidth?\n", "\n", - "#Variable declaration\n", "AB=1000 #(1+AvolB) term \n", "f2_OL=160 #open loop bandwidth(Hz)\n", "\n", - "#Calculation\n", "f2_CL=f2_OL*AB/1000 #closed loop bandwidth(KHz)\n", "\n", - "#Result\n", "print 'closed loop bandwidth f2(CL)= ',f2_CL,'KHZ'" ], "language": "python", @@ -409,19 +360,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 19.10.py\n", - "#LF308 with AVOL=250,000 and f2(OL)=1.2 Hz, \n", - "#what is closed loop bandwidth for Av(CL)=50?\n", "\n", - "#Variable declaration\n", "AVOL=250000 #open loop voltage gain\n", "f2_OL=1.2 #open loop bandwidth(Hz)\n", "Av_CL=50 #closed loop voltage gain\n", "\n", - "#Calculation\n", "f2_CL=f2_OL*AVOL/Av_CL/1000 #closed loop bandwidth(KHz)\n", "\n", - "#Result\n", "print 'closed loop bandwidth for Av(CL) = 50, f2(CL)= ',f2_CL,'KHZ'" ], "language": "python", @@ -449,17 +394,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 19.11.py\n", - "#LM12 with AVOL =50000 and f2(OL)=14 Hz, what is closed loop bandwidth?\n", "\n", - "#Variable declaration\n", "AVOL=50000 #open loop voltage gain\n", "f2_OL=14 #open loop bandwidth(Hz)\n", "\n", - "#Calculation\n", "f2_CL=f2_OL*(1+AVOL)/1000 #closed loop bandwidth(KHz)\n", "\n", - "#Result\n", "print 'closed loop bandwidth f2(CL)= ',f2_CL,'KHZ'" ], "language": "python", @@ -487,17 +427,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 19.12.py\n", - "#OP-07A with (1+AvolB)=2500 and f2(OL)=20 Hz, what is closed loop bandwidth?\n", "\n", - "#Variable declaration\n", "AB=2500 #(1+AvolB) term \n", "f2_OL=20 #open loop bandwidth(Hz)\n", "\n", - "#Calculation\n", "f2_CL=f2_OL*AB/1000 #closed loop bandwidth(KHz)\n", "\n", - "#Result\n", "print 'closed loop bandwidth f2(CL)= ',f2_CL,'KHZ'" ], "language": "python", @@ -525,22 +460,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 19.13.py\n", - "#LM741C with Funity 1MHz, Sr=0.5 V/us. \n", - "#Av(CL) =10. Find closed loop bandwidth & largest peak output voltage at f2(CL)?\n", "\n", "import math\n", "\n", - "#Variable declaration\n", "Av_CL=10.0 #voltage gain\n", "Funity=1*10**6 #unity frequency (Hz) \n", "Sr=0.5 #slew rate (V/us)\n", "\n", - "#Calculation\n", "f2_CL=Funity/Av_CL/1000 #closed loop bandwidth(KHz)\n", "Vp_max=1000*Sr/(2*math.pi*f2_CL) #largest peak output voltage(V)\n", "\n", - "#Result \n", "print 'closed loop bandwidth f2(CL)= ',f2_CL,'KHZ'\n", "print 'largest peak output voltage Vp(max)= ',round(Vp_max,3),'V'" ], diff --git a/Electronic_Principles_/Chapter_1_New.ipynb b/Electronic_Principles_/Chapter_1_New.ipynb index e0a4b799..5245d442 100644 --- a/Electronic_Principles_/Chapter_1_New.ipynb +++ b/Electronic_Principles_/Chapter_1_New.ipynb @@ -27,16 +27,11 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 1.1.py\n", - "#Ac voltage source has Rs 50 ohms. For what load resistance is the source stiff?\n", "\n", - "#Variable declaration\n", "Rs=50 #source resistance(Ohm)\n", "\n", - "#Calculation\n", "RL=100*Rs/1000 #Minimum Load resistance(KOhm)\n", "\n", - "#Result\n", "print 'Minimum Load resistance =',RL,'KOhm'" ], "language": "python", @@ -64,17 +59,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 1.2.py\n", - "#Current source of 2 mA has Rs of 10Mohm. Over what range of load resistance is the current source stiff?\n", "\n", - "#Variable declaration\n", "Is=0.002 #Current source(A)\n", "Rs=10000000 #internal resistance(Ohm)\n", "\n", - "#Calculation\n", "Rl_Max=0.01*Rs/1000 #Maximum load resistance(KOhm)\n", "\n", - "#Result\n", "print 'With 100:1 Rule, Maximum Load resistance =',Rl_Max,'KOhm'\n", "print 'Stiff range for current source is load resistance from 0 KOhm to',Rl_Max,'KOhm'" ], @@ -104,17 +94,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 1.3.py\n", - "#If a transistor is pumping 2 mA through RL of 10KOhm then find load voltage.\n", "\n", - "#Variable declaration\n", "Il=0.002 #current source(A)\n", "Rl=10000 #load resistance(Ohm)\n", "\n", - "#Calculation\n", "Vl=Il*Rl #load voltage(V)\n", "\n", - "#Result\n", "print 'Load Voltage =',Vl,'V'" ], "language": "python", @@ -142,24 +127,19 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 1.4.py\n", - "#What are the Thevenin voltage & resistance in Fig. 1-9a?\n", "\n", "print 'As per figure 1-9a, Calculate Thevenin resistor by opening load resistor'\n", "\n", - "#Variable declaration\n", "Vs=72 #source voltage\n", "R1=6 #Resistance (KOhm)\n", "R2=3 #Resistance (KOhm)\n", "R3=4 #Resistance (KOhm)\n", "\n", - "#Calculation\n", "Ro=R1+R2 #Resistance (KOhm)\n", "I=Vs/Ro\n", "Vab=R2*Vs/(R1+R2) #Thevenin voltage(V)\n", "Rth=((R1*R2)/(R1+R2))+R3 #Thevenin Resistance(KOhm)\n", "\n", - "#Result\n", "print 'After removing Rl current flowing through 6KOhm is',I,'mA'\n", "print 'Thevenin Voltage Vth =',Vab,'V'\n", "print 'Calculating Thevenin Resistance with considering R1 & R2 in parallel'\n", @@ -194,10 +174,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 1.5.py\n", - "#In circuit shown in figure 1-11a, measure thevenin voltage and resistance.\n", "\n", - "#Variable declaration\n", "Vs=72 #source voltage\n", "R1=2 #resistance1 (KOhm)\n", "R2=2 #resistance1 (KOhm)\n", @@ -208,12 +185,9 @@ "R7=0.5 #resistance1 (KOhm)\n", "RL=1 #load resistance (KOhm)\n", "\n", - "#Calculation\n", - "#from multimeter following values will be measured.\n", "Vth=9 #Thevenin voltage(V)\n", "Rth=1.5 #Thevenin resistance(KOhm)\n", "\n", - "#Result\n", "print 'Thevenin Voltage Vth =',Vth,'V'\n", "print 'Thevenin Resistance =',Rth,'KOhm'" ], @@ -243,18 +217,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 1.6.py\n", - "#Convert thevenin circuit of figure 1-14a into norton circuit.\n", "\n", - "#Variable declaration\n", "Vs=10 #source voltage\n", "Rs=2 #series source resistance (KOhm)\n", "\n", - "#Calculation\n", "IN=Vs/Rs #Norton current(mA)\n", "Rp=Rs #parallel source resistance(KOhm)\n", "\n", - "#Result\n", "print 'Norton current IN =',IN,'mA'\n", "print 'Norton Resistance =',Rp,'KOhm'" ], diff --git a/Electronic_Principles_/Chapter_20_New.ipynb b/Electronic_Principles_/Chapter_20_New.ipynb index 1b58e3b8..1bf81dd2 100644 --- a/Electronic_Principles_/Chapter_20_New.ipynb +++ b/Electronic_Principles_/Chapter_20_New.ipynb @@ -27,19 +27,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 20.1.py\n", - "#In figure 20-6, R1=100KOhm, Rf=100KOhm, R2=1KOhm, what is the voltage gain when JFET is On & off?\n", "\n", - "#Variable declaration\n", "Rf=100.0 #feedback path resistance Rf (KOhm)\n", "R1=100.0 #inverting input resistance R1(KOhm)\n", "R2=1.0 #inverting input & drain resistance R2(KOhm)\n", "\n", - "#Calculation\n", "Av1=(Rf/(R1**-1+R2**-1)**-1)+1 #maximum voltage gain\n", "Av2=(Rf/R1)+1 #minimum voltage gain\n", "\n", - "#Result\n", "print 'maximum voltage gain = ',Av1\n", "print 'minimum voltage gain = ',Av2" ], @@ -69,18 +64,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 20.2.py\n", - "#In figure 20-10. R1=1.2KOhm, R2=91KOhm, what are the max & min Av?\n", "\n", - "#Variable declaration\n", "R1=1.2 #inverting input resistance R1(KOhm)\n", "R2=91.0 #feedback resistance R2(KOhm)\n", "\n", - "#Calculation\n", "Av1=-R2/R1 #maximum voltage gain\n", "Av2=0 #minimum voltage gain\n", "\n", - "#Result\n", "print 'maximum voltage gain = ',round(Av1,2)\n", "print 'minimum voltage gain = ',Av2" ], @@ -110,18 +100,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 20.3.py\n", - "#If R=1.5KOhm, nR=7.5KOhm in figure 20-10, what is the maximum positive voltage gain & other fixed resistance?\n", "\n", - "#Variable declaration\n", "R=1.5 #inverting input resistance R1(KOhm)\n", "nR=7.5 #feedback resistance(KOhm)\n", "\n", - "#Calculation\n", "n=nR/R #max. limit of voltage gain \n", "rf=nR/(n-1) #fixed resistor (KOhm)\n", "\n", - "#Result\n", "print 'maximum positive voltage gain = ',n\n", "print 'other fixed resistor = ',rf,'KOhm'" ], @@ -151,11 +136,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 20.4.py\n", - "#In figure 20-18 R1=1KOhm, R2=100KOhm, R=10KOhm. what is differential voltage gain & common mode voltage gain? \n", - "#resistance tolerance is 0.01% ,Vin=10mV, Vin(CM)=20V, what are the values of differential & common mode output signals?\n", "\n", - "#Variable declaration\n", "R1=1.0 #inverting input resistance R1(KOhm)\n", "R2=100.0 #feedback resistance R2(KOhm)\n", "R=10.0 #resistor of opamp in seconnd stage(KOhm)\n", @@ -163,13 +144,11 @@ "Vin_CM=10 #common mode input voltage(V)\n", "T=0.0001 #tolerance of resistor \n", "\n", - "#Calculation\n", "Av=(R2/R1)+1 #preamp voltage gain\n", "Av_CM=2*T #common mode voltage gain of 2nd stage\n", "Vout=-Av*Vin #output siganl voltage(V)\n", "Vout_CM=Av_CM*Vin_CM #output siganl voltage for common mode signal(V)\n", "\n", - "#Result\n", "print 'output siganl voltage for common mode signal Vout(CM) = ',Vout_CM,'V'\n", "print 'output siganl voltage Vout = ',Vout,'V'" ], @@ -199,10 +178,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 20.5.py\n", - "#In figure 20-22, R1=1KOhm, R2=2KOhm, R3=3KOhm, R4=4KOhm, R5=5KOhm ,Rf=6KOhm. what is voltage gain of each channel?\n", "\n", - "#Variable declaration\n", "Rf=6.0 #feedback path resistance Rf (KOhm)\n", "R1=1.0 #inverting input resistance R1(KOhm)\n", "R2=2.0 #inverting input resistance R2(KOhm)\n", @@ -210,13 +186,11 @@ "R4=4.0 #non-inverting input resistance R4(KOhm)\n", "R5=5.0 #non-inverting input resistance R5(KOhm)\n", "\n", - "#Calculation\n", "Av1=(-Rf/R1) #voltage gain1\n", "Av2=(-Rf/R2) #voltage gain2\n", "Av3=(1+(Rf/((R1**-1+R2**-1)**-1)))*(((R4**-1+R5**-1)**-1)/(R3+((R4**-1+R5**-1)**-1))) #voltage gain3\n", "Av4=(1+(Rf/((R1**-1+R2**-1)**-1)))*(((R3**-1+R5**-1)**-1)/(R4+((R3**-1+R5**-1)**-1))) #voltage gain4\n", "\n", - "#Result\n", "print 'Voltage gain channel-1 Av1 = ',Av1\n", "print 'Voltage gain channel-2 Av2 = ',Av2\n", "print 'Voltage gain channel-3 Av3 = ',round(Av3,2)\n", @@ -250,11 +224,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 20.6.py\n", - "#In figure 20-25, D0=1,D1=0,D2=0, and D3=1. using Vref =5V, \n", - "#determine decimal equivalent of BIN and output voltage of converter.\n", "\n", - "#Variable declaration \n", "D0=1 #digital input0 (binary)\n", "D1=0 #digital input1 (binary)\n", "D2=0 #digital input2 (binary)\n", @@ -262,11 +232,9 @@ "Vref=5 #reference voltage(V)\n", "N=4 #no. of inputs\n", "\n", - "#Calculation \n", "BIN=(D0*2**0)+(D1*2**1)+(D2*2**2)+(D3*2**3) #decimal equivalent BIN\n", "Vout=-((2*Vref*BIN)/2.0**N) #output voltage of converter(V)\n", "\n", - "#Result\n", "print 'decimal equivalent BIN = ',BIN\n", "print 'output voltage of converter Vout = ',Vout,'V'" ], @@ -296,25 +264,19 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 20.7.py\n", - "#In figure 20-27, R1=1KOhm, R2=51 KOhm, what is voltage gain & closed loop output impedance? \n", - "#what is shorted load current of circuit if each transistor has B = 125?\n", "\n", - "#Variable declaration\n", "R2=51 #feedback path resistance (KOhm)\n", "R1=1 #inverting input resistance R1(KOhm)\n", "Bdc=125 #current gain\n", "Zout=75 #open loop output impedance(Ohm)\n", "AVOL=100000 #741C voltage gain\n", "\n", - "#Calculation\n", "Av=-R2/R1 #closed loop voltage gain\n", "B=R1/(R1+R2) #feedback fraction\n", "Zout_CL=Zout/(1+(AVOL*B)) #closed loop output impedance(Ohm)\n", "Isc=25.0/1000 #shorted current for 741C op-amp(A)\n", "Imax=Bdc*Isc #maximum load current(A)\n", "\n", - "#Result\n", "print 'closed loop output impedance Zout(CL) = ',Zout_CL,'Ohm'\n", "print 'maximum load current Imax = ',Imax,'A'" ], @@ -344,21 +306,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 20.8.py\n", - "#if the current source of figure 20-28 has R=10KOhm, Vin =1 V, VCC=15V. what is output current? \n", - "#what is maximum load resistance for vin = 10V?\n", "\n", - "#Variable declaration\n", "Vin=1.0 #input voltage(V)\n", "VCC=15 #supply voltage(V)\n", "R=10 #inverting input resistance(KOhm)\n", "Vin2=10.0 #larger input(V)\n", "\n", - "#Calculation\n", "iout=Vin/R #output current(mA)\n", "RL_max=R*(VCC/Vin2-1) #Maximum load resistance(KOhm) \n", "\n", - "#Result\n", "print 'Output current iout = ',iout,'mA'\n", "print 'Maximum load resistance RL(max) = ',RL_max,'KOhm'" ], @@ -388,21 +344,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 20.9.py\n", - "#figure 20-31 has R=15KOhm, Vin =3 V, VCC=15V. what is output current? \n", - "#what is maximum load resistance for maximum Vin = 9V?\n", "\n", - "#Variable declaration\n", "Vin=3.0 #input voltage(V)\n", "VCC=15 #supply voltage(V)\n", "R=15 #inverting input resistance(KOhm)\n", "Vin2=12.0 #larger input(V)\n", "\n", - "#Calculation\n", "iout=-Vin/R #output current(mA)\n", "RL_max=(R/2.0)*(VCC/Vin2-1) #Maximum load resistance(KOhm) \n", "\n", - "#Result\n", "print 'Output current iout = ',iout,'mA'\n", "print 'Maximum load resistance RL(max) = ',RL_max,'KOhm'" ], @@ -432,21 +382,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 20.10.py\n", - "#If rds varies from 50 Ohm to 120 KOhm in figure 20-32, what is the maximum & minimum voltage gain?\n", "\n", - "#Variable declaration\n", "R2=47 #feedback path resistance (KOhm)\n", "R1=1.0 #inverting input resistance R1(KOhm)\n", "R3=100 #non-inverting input resistance R3(KOhm)\n", "rds1=0.050 #ohmic resistance of JFET (KOhm)\n", "rds2=120.0 #ohmic resistance of JFET (KOhm)\n", "\n", - "#Calculation\n", "Av1=((R2/R1)+1)*(rds1/(rds1+R3)) #minimum voltage gain\n", "Av2=((R2/R1)+1)*(rds2/(rds2+R3)) #maximum voltage gain\n", "\n", - "#Result\n", "print 'Maximum voltage gain Av = ',round(Av2,2)\n", "print 'Minimum voltage gain Av = ',round(Av1,3)" ], diff --git a/Electronic_Principles_/Chapter_21_New.ipynb b/Electronic_Principles_/Chapter_21_New.ipynb index 23c2ea5f..93fb24ec 100644 --- a/Electronic_Principles_/Chapter_21_New.ipynb +++ b/Electronic_Principles_/Chapter_21_New.ipynb @@ -27,22 +27,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 21.1.py\n", - "#what is the voltage gain, cutoff frequency & the frequency response?\n", "\n", "import math\n", "\n", - "#Variable declaration\n", "Rf=39.0 #feedback path resistance Rf (KOhm)\n", "R1=1.0 #inverting input resistance R1(KOhm)\n", "R2=12.0*10**3 #non-inverting input resistance R2(Ohm)\n", "C=680*10**-12 #capacitance at non-inverting input(F)\n", "\n", - "#Calculation\n", "Av=(Rf/R1)+1 # voltage gain\n", "fc=(2*math.pi*R2*C)**-1 #cutoff frequency(Hz)\n", "\n", - "#Result\n", "print 'voltage gain Av = ',Av\n", "print 'cutoff frequency fc = ',round((fc/1000),2),'KHz'\n", "print 'frequency response:'\n", @@ -76,20 +71,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 21.2.py\n", - "#what is the voltage gain, cutoff frequency & frequency response?\n", "import math\n", "\n", - "#Variable declaration\n", "Rf=43.0 #feedback path resistance Rf (KOhm)\n", "R1=0.220 #non-inverting input resistance R1(KOhm)\n", "C=100*10**-12 #capacitance (F)\n", "\n", - "#Calculation\n", "Av=(-Rf/R1) # voltage gain\n", "fc=((2*math.pi*Rf*C)**-1)/10**6 #cutoff frequency(KHz)\n", "\n", - "#Result\n", "print 'voltage gain Av = ',round(Av,2)\n", "print 'cutoff frequency fc = ',round(fc,2),'KHz'\n", "print 'voltage gain is 45.8 dB in pass band. response breaks at 37 KHz.'" @@ -121,22 +111,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 21.3.py\n", - "#what are pole frequency, Q and cutoff frequency?\n", "import math\n", "\n", - "#Variable declaration\n", "R1=30 #non-inverting input resistance R1(KOhm)\n", "R2=30 #non-inverting input resistance R2(KOhm)\n", "C2=1.64*10**-9 #feedback path capacitance (F)\n", "C1=820*10**-12 #non-inverting input capacitance (F)\n", "\n", - "#Calculation\n", "Q=0.5*((C2/C1)**0.5) #Q\n", "fp=((2*math.pi*R1*(C1*C2)**0.5)**-1)/10**6 #pole frequency(KHz)\n", "fc=fp #cutoff frequency(KHz)\n", "\n", - "#Result\n", "print ' Q = ',round(Q,3)\n", "print 'pole frequency fp = ',round(fp,2),'KHz'\n", "print 'cutoff frequency fc = fp, ',round(fc,2),'KHz'" @@ -168,23 +153,18 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 21.4.py\n", - "#In figure 21-28, what are pole frequency, Q & cutoff frequency?\n", "import math\n", "\n", - "#Variable declaration\n", "R1=51 #non-inverting input resistance R1(KOhm)\n", "R2=51 #non-inverting input resistance R2(KOhm)\n", "C2=440*10**-12 #feedback path capacitance (F)\n", "C1=330*10**-12 #non-inverting input capacitance (F)\n", "kc=0.786 #constant for bessel response \n", "\n", - "#Calculation\n", "Q=0.5*((C2/C1)**0.5) #Q\n", "fp=((2*math.pi*R1*(C1*C2)**0.5)**-1)/10**6 #pole frequency(KHz)\n", "fc=kc*fp #cutoff frequency(KHz) \n", "\n", - "#Result\n", "print ' Q = ',round(Q,2)\n", "print 'pole frequency fp = ',round(fp,2),'KHz'\n", "print 'cutoff frequency fc = ',round(fc,2),'KHz'" @@ -216,12 +196,9 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 21.5.py\n", - "#what are pole frequency and Q & cutoff and 3-dB frequencies?\n", "\n", "import math\n", "\n", - "#Variable declaration\n", "R1=22 #non-inverting input resistance R1(KOhm)\n", "R2=22 #non-inverting input resistance R2(KOhm)\n", "C2=27*10**-9 #feedback path capacitance (F)\n", @@ -230,13 +207,11 @@ "k0=0.99 #constant for bessel response\n", "k3=1.54 #constant for bessel response\n", "\n", - "#Calculation\n", "Q=0.5*((C2/C1)**0.5) #Q\n", "fp=((2*math.pi*R1*(C1*C2)**0.5)**-1)/10**6 #pole frequency(KHz)\n", "fc=kc*fp #cutoff frequency(KHz) \n", "f3=k3*fp #3-dB frequency(KHz)\n", "\n", - "#Result\n", "print 'Q = ',round(Q,2)\n", "print 'pole frequency fp = ',round(fp,2),'KHz'\n", "print 'cutoff frequency fc = ',round(fc,2),'KHz'\n", @@ -270,11 +245,8 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 21.6.py\n", - "#what are pole frequency, Q & cutoff frequency?\n", "import math\n", "\n", - "#Variable declaration\n", "R1=47 #non-inverting input resistance R1(KOhm)\n", "R2=47 #non-inverting input resistance R2(KOhm)\n", "C2=330*10**-12 #feedback path capacitance (F)\n", @@ -282,13 +254,11 @@ "R3=51 #inverting input resistance R3(KOhm)\n", "Rf=30.0 #feedback path resistance Rf (KOhm)\n", "\n", - "#Calculation\n", "Av=(Rf/R3)+1 #voltage gain \n", "Q=(3-Av)**-1 #Q\n", "fp=((2*math.pi*R1*(C1*C2)**0.5)**-1)/10**6 #pole frequency(KHz)\n", "fc=fp #cutoff frequency(KHz) \n", "\n", - "#Result\n", "print ' Q = ',round(Q,2)\n", "print 'pole frequency fp = ',round(fp,2),'KHz'\n", "print 'cutoff frequency fc = ',round(fc,2),'KHz'" @@ -320,11 +290,8 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 21.7.py\n", - "#In figure 21-33, what are pole frequency, Q & cutoff frequency?\n", "import math\n", "\n", - "#Variable declaration\n", "R1=82 #non-inverting input resistance R1(KOhm)\n", "R2=82 #non-inverting input resistance R2(KOhm)\n", "C2=100*10**-12 #feedback path capacitance (F)\n", @@ -333,13 +300,11 @@ "Rf=15.0 #feedback path resistance Rf (KOhm)\n", "kc=0.786 #constant for bessel response \n", "\n", - "#Calculation\n", "Av=(Rf/R3)+1 #voltage gain \n", "Q=(3-Av)**-1 #Q\n", "fp=((2*math.pi*R1*(C1*C2)**0.5)**-1)/10**6 #pole frequency(KHz)\n", "fc=kc*fp #cutoff frequency(KHz) \n", "\n", - "#Result\n", "print 'Q = ',round(Q,2)\n", "print 'pole frequency fp = ',round(fp,2),'KHz'\n", "print 'cutoff frequency fc = ',round(fc,2),'KHz'" @@ -371,11 +336,8 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 21.8.py\n", - "#In figure 21-34, what are pole frequency, Q, cutoff,resosnant & 3-dB frequencies, ripple depth in decibles?\n", "import math\n", "\n", - "#Variable declaration\n", "R1=56 #non-inverting input resistance R1(KOhm)\n", "R2=56 #non-inverting input resistance R2(KOhm)\n", "C2=220*10**-12 #feedback path capacitance (F)\n", @@ -386,7 +348,6 @@ "k0=1.0 #constant for bessel response\n", "k3=1.55 #constant for bessel response\n", "\n", - "#Calculation\n", "Av=(Rf/R3)+1 #voltage gain \n", "Q=(3-Av)**-1 #Q\n", "fp=((2*math.pi*R1*(C1*C2)**0.5)**-1)/10**6 #pole frequency(KHz)\n", @@ -396,7 +357,6 @@ "Av1=((1.01*Rf)/(0.99*R3))+1 #voltage gain considering 1% tolerance \n", "Q1=(3-Av1)**-1 #Q\n", "\n", - "#Result\n", "print 'Q = ',Q\n", "print 'pole frequency fp = ',round(fp,2),'KHz'\n", "print 'cutoff frequency fc = ',round(fc,2),'KHz'\n", @@ -436,22 +396,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 21.9.py\n", - "#what are pole frequency, Q & cutoff frequency?\n", "\n", "import math\n", "\n", - "#Variable declaration\n", "R1=24 #non-inverting input resistance R1(KOhm)\n", "R2=12 #feedback path resistance R2(KOhm)\n", "C=4.7*10**-9 #non-inverting input capacitance (F)\n", "\n", - "#Calculation\n", "Q=0.5*((R1/R2)**0.5) #Q\n", "fp=((2*math.pi*C*(R1*R2)**0.5)**-1)/10**6 #pole frequency(KHz)\n", "fc=fp #cutoff frequency(KHz) \n", "\n", - "#Result\n", "print 'Q = ',round(Q,2)\n", "print 'pole frequency fp = ',math.ceil(fp),'KHz'\n", "print 'cutoff frequency fc = ',math.ceil(fc),'KHz'" @@ -483,11 +438,8 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 21.10.py\n", - "#In figure 21-37, what are pole frequency, Q, cutoff,resosnant & 3-dB frequencies and ripple depth in decibles?\n", "import math\n", "\n", - "#Variable declaration\n", "R1=30 #non-inverting input resistance R1(KOhm)\n", "R2=30 #feedback path resistance R2(KOhm)\n", "C=1*10**-9 #non-inverting input capacitance (F)\n", @@ -497,7 +449,6 @@ "k0=0.94 #constant for bessel response\n", "k3=1.48 #constant for bessel response\n", "\n", - "#Calculation\n", "Av=(Rf/R3)+1 #voltage gain \n", "Q=(3-Av)**-1 #Q\n", "fp=((2*math.pi*R1*C)**-1)/10**6 #pole frequency(KHz)\n", @@ -505,7 +456,6 @@ "f0=fp/k0 #resosnant frequency(KHz)\n", "f3=fp/k3 #3-dB frequency (KHz)\n", "\n", - "#Result\n", "print 'Q = ',Q\n", "print 'pole frequency fp = ',round(fp,2),'KHz'\n", "print 'cutoff frequency fc = ',round(fc,2),'KHz'\n", @@ -543,23 +493,18 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 21.11.py\n", - "#In figure 21-42, gate voltage varies from 15 to 80 Ohm. Find bandwidth and minimum & maximum frequencies.\n", "import math\n", "\n", - "#Variable declaration\n", "R1=18 #non-inverting input resistance R1(KOhm)\n", "R2=30 #feedback path resistance R2(KOhm)\n", "C=8.2*10**-9 #non-inverting input capacitance (F)\n", "R31=0.080 #inverting max input resistance R3(KOhm)\n", "R32=0.015 #inverting min input resistance R3(KOhm)\n", "\n", - "#Calculation\n", "BW=((2*math.pi*R1*C)**-1)/10**6 #bandwidth(KHz)\n", "f0=((2*math.pi*C*((2*R1*((R1**-1+R31**-1)**-1))**0.5))**-1)/10**6 #minimum center frequency(KHz)\n", "f01=((2*math.pi*C*((2*R1*((R1**-1+R32**-1)**-1))**0.5))**-1)/10**6 #minimum center frequency(KHz)\n", "\n", - "#Result\n", "print 'bandwidth BW = ',round(BW,2),'KHz'\n", "print 'minimum center frequency f0 = ',round(f0,2),'KHz'\n", "print 'maximum center frequency f0 = ',round(f01,2),'KHz'" @@ -591,23 +536,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 21.12.py\n", - "#In figure 21-43, what are the voltage gain, center frequency and Q for bandstop filter, \n", - "#if R=22KOhm, C=120nF, R1=13KOhm, R2=10KOhm.\n", "import math\n", "\n", - "#Variable declaration\n", "R=22.0 #non-inverting input resistance(KOhm)\n", "C=120*10**-9 #non-inverting input capacitance (F)\n", "R1=13.0 #inverting input resistance(KOhm)\n", "R2=10.0 #feedback path resistance(KOhm)\n", "\n", - "#Calculation\n", "Av=(R2/R1)+1 #voltage gain \n", "Q=0.5/(2-Av) #Q\n", "f0=((2*math.pi*R*C)**-1)/10**3 #center frequency(KHz)\n", "\n", - "#Result\n", "print 'voltage gain Av = ',round(Av,2)\n", "print 'Q = ',round(Q,2)\n", "print 'center frequency f0 = ',round(f0,2),'KHz'" @@ -639,21 +578,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 21.13.py\n", - "#In figure 21-45b, R=1KOhm, C=100nF. what is phase shift of output voltage when f=1KHz?\n", "\n", "import math\n", "\n", - "#Variable declaration\n", "R=1.0 #non-inverting input resistance(KOhm)\n", "C=100*10**-9 #non-inverting input capacitance (F)\n", "f=1.0 #frequency given(KHz)\n", "\n", - "#Calculation\n", "f0=((2*math.pi*R*C)**-1)/10**6 #center frequency(KHz)\n", "phi=(2*math.atan(f0/f))*180/math.pi #phase shift(deg)\n", "\n", - "#Result\n", "print 'center frequency f0 = ',round(f0,2),'KHz'\n", "print 'phase shift = ',math.ceil(phi),'degrees'" ], diff --git a/Electronic_Principles_/Chapter_22_New.ipynb b/Electronic_Principles_/Chapter_22_New.ipynb index 789ac110..ebbb0124 100644 --- a/Electronic_Principles_/Chapter_22_New.ipynb +++ b/Electronic_Principles_/Chapter_22_New.ipynb @@ -27,22 +27,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 22.4.py\n", - "#Input voltage is a sine wave with a peak value of 10V. what is the trip point & cutoff frequency of bypass circuit?\n", "import math\n", "\n", - "#Variable declaration\n", "Vin=10 #ac input(V)\n", "Vs=15 #non-inverting input voltage(V)\n", "R1=200.0*10**3 #non-inverting input resistance R1(Ohm)\n", "R2=100.0*10**3 #non-inverting input resistance R2(Ohm)\n", "C=10*10**-6 #capacitance at non-inverting input(F)\n", "\n", - "#Calculation\n", "Vref=Vs/3 #reference voltage at trip point(V)\n", "fc=(2*math.pi*((R1**-1+R2**-1)**-1)*C)**-1 #cutoff frequency(Hz)\n", "\n", - "#Result\n", "print 'trip point voltage Vref = ',Vref,'V'\n", "print 'cutoff frequency of bypass circuit fc = ',round(fc,2),'Hz'" ], @@ -72,22 +67,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 22.5.py\n", - "#what is the duty cycle of output waveform in figure 22-15b?\n", "\n", "import math\n", "\n", - "#Variable declaration\n", "Vp=10.0 #sine peak(V)\n", "Vin=5.0 #input voltage(V) \n", "\n", - "#Calculation\n", - "#1st solution\n", "theta=math.ceil((math.asin(Vin/Vp))*180/math.pi) #angle theta (deg)\n", - "#2nd solution\n", "D=(150-theta)/360.0 #duty cycle\n", "\n", - "#Result\n", "print 'theta = ',theta,'degrees'\n", "print 'duty cycle D = ',round((D*100),2),'%'" ], @@ -117,21 +105,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 22.6.py\n", - "#If Vsat=13.5V, what are the trip points & hysteresis in figure 22-21?\n", "\n", - "#Variable declaration\n", "R1=1.0 #non-inverting input resistance R1(KOhm)\n", "R2=47.0 #feedback path resistance R2(KOhm)\n", "Vsat=13.5 #saturation voltage(V)\n", "\n", - "#Calculation\n", "B=R1/(R1+R2) #feedback fraction\n", "UTP=B*Vsat #upper trip point\n", "LTP=-B*Vsat #lower trip point\n", "H=UTP-LTP #hysteresis\n", "\n", - "#Result\n", "print 'lower trip point LTP = ',round(LTP,2),'V'\n", "print 'upper trip point LTP = ',round(UTP,2),'V'\n", "print 'hysteresis is ',round(H,2),'V'" @@ -163,22 +146,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 22.7.py\n", - "#what is the output voltage at end of input pulse & closed loop time constant of integrator? \n", - "#open loop voltage gain of 100,000.\n", "\n", - "#Variable declaration\n", "R=2 #inverting input resistance R1(KOhm)\n", "C=1*10**-6 #feedback path capacitance (F)\n", "T=1*10**-3 #time period(s)\n", "Vin=8 #input pulse voltage(V)\n", "AVOL=100000 #open loop voltage gain\n", "\n", - "#Calculation\n", "V=Vin*T/(R*C)/1000 #output voltage(V)\n", "t=R*C*(AVOL+1)*1000 #time constant(s)\n", "\n", - "#Result\n", "print 'Magnitude of negative output voltage at end of the pulse = ',V,'V'\n", "print 'closed loop time constant = ',t,'s'" ], @@ -208,20 +185,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 22.5.py\n", - "#what is the output voltage in figure 22-30 if the input frequency is 1 KHz?\n", "\n", - "#Variable declaration\n", "R1=1*10**3 #inverting input resistance R1(Ohm)\n", "R2=10*10**3 #feedback path resistance R2(Ohm)\n", "C=10*10**-6 #feedback path capacitance (F)\n", "Vin=5 #input pulse voltage(V)\n", "f=1*10**3 #input frequency(Hz)\n", "\n", - "#Calculation\n", "Vout=Vin/(2*f*R1*C) #output voltage(V)\n", "\n", - "#Result\n", "print 'peak to peak output voltage = ',Vout,'Vpp'" ], "language": "python", @@ -249,24 +221,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 22.9.py\n", - "#The variable resistance has a maximum value of 10 KOhm. \n", - "#what is duty cyale when wiper is at middle of its range for traingular input frequency = 1KHz.\n", "\n", - "#Variable declaration\n", "Vs=15.0 #non-inverting input voltage(V)\n", "Rw=5.0*10**3 #inverting input wiper resistance(Ohm)\n", "R1=10.0*10**3 #inverting input resistance R1(Ohm)\n", "f=1.0 #input frequency(KHz) \n", "\n", - "#Calculation\n", "Vref=Vs*(Rw/(Rw+R1)) #reference voltage(V)\n", "T=1/f #period of signal(s)\n", - "#As per geometry in 22-31b\n", "W=2*(T/2)*((Vs/2)-Vref)/Vs #output pulse width\n", "D=W/T #duty cycle\n", "\n", - "#Result\n", "print 'duty cycle D = ',round((D*100),2),'%'" ], "language": "python", @@ -294,23 +259,18 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 22.10.py\n", - "#In figure 22-34, what is the frequency of output signal?\n", "\n", "import math\n", "\n", - "#Variable declaration\n", "R1=18.0 #non-inverting input resistance R1(KOhm)\n", "R2=2.0 #feedback path resistance R2(KOhm)\n", "R=1.0 #feedback path resistance R(KOhm)\n", "C=0.1*10**-6 #feedback path capacitance (F)\n", "\n", - "#Calculation\n", "B=R1/(R1+R2) #feedback fraction\n", "T=10**9*2*R*C*math.log((1+B)/(1-B)) #period of output(us)\n", "f=1000*1/T #frequency(KHz)\n", "\n", - "#Result\n", "print 'period T = ',round(T,2),'us'\n", "print 'frequency f = ',round(f,2),'KHz'" ], @@ -340,20 +300,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 22.11.py\n", - "#In figure 22-33 peak outout voltage is 13.5V. R4=10KOhm,C2=10uF,\n", - "#what is the peak to peak value of triangular output wave?\n", "\n", - "#Variable declaration\n", "Vsat=13.5 #saturation voltage given(V)\n", "R4=10*10**3 #given resistance R4(Ohm)\n", "C2=10*10**-6 #given capacitance C2(F)\n", "T=589*10**-6 #period from preceding example(s)\n", "\n", - "#Calculation\n", "Vout=Vsat*T/(2*R4*C2) #output voltage (V) \n", "\n", - "#Result\n", "print 'Output voltage = ',round((Vout*1000),2),'mVpp'" ], "language": "python", @@ -381,22 +335,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 22.12.py\n", - "#In figure 22-35a R1=1KOhm, R2=100KOhm, R3=10KOhm, R4=100KOhm and C=10uF.\n", - "#what is peak to peak output if Vsat =13V? what is frequency of triangular wave?\n", "\n", - "#Variable declaration\n", "R1=1*10**3 #resistance R1(Ohm)\n", "R2=100*10**3 #resistance R2(Ohm)\n", "R3=10*10**3 #resistance R3(Ohm)\n", "C=10*10**-6 #capacitance (F)\n", "\n", - "#Calculation\n", "UTP=Vsat*R1/R2 #UTP value (V)\n", "Vout=2*UTP #output voltage/hysteresis (V)\n", "f=R2/(4*R1*R3*C) #frequency(Hz)\n", "\n", - "#Result\n", "print 'Vout = H = ',Vout,'V'\n", "print 'frequency f = ',f,'Hz'" ], diff --git a/Electronic_Principles_/Chapter_23_New.ipynb b/Electronic_Principles_/Chapter_23_New.ipynb index a5d3197f..a842cb81 100644 --- a/Electronic_Principles_/Chapter_23_New.ipynb +++ b/Electronic_Principles_/Chapter_23_New.ipynb @@ -27,22 +27,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 23.1.py\n", - "#Calculate the minimum and maximum frequencies in figure 23-9.\n", "import math\n", "\n", - "#Variable declaration\n", "R1=100.0*10**3 #non-inverting input resistance wiper R1(Ohm)\n", "R2=1.0*10**3 #non-inverting input resistance R2(Ohm)\n", "C=0.01*10**-6 #capacitance at non-inverting input(F)\n", "\n", - "#Calculation\n", "R=R1+R2 #max. total resistance(Ohm)\n", "fr1=(2*math.pi*R*C)**-1 #minimum frequency(Hz)\n", "R=R2 #min. total resistance(Ohm)\n", "fr2=(2*math.pi*R*C)**-1 #maximum frequency(Hz)\n", "\n", - "#Result\n", "print 'minimum frequency fr = ',round(fr1,2),'Hz'\n", "print 'maximum frequency fr = ',round((fr2/1000),2),'KHz'" ], @@ -72,19 +67,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 23.2.py\n", - "#if the lamp voltage is expressed in rms volts,what is the output voltage of oscillator?\n", "\n", - "#Variable declaration\n", "Rf=2 #feedback resistance(KOhm)\n", "Rl=1 #lamp resistance(KOhm)\n", "Vl=2 #lamp voltage(V)\n", "\n", - "#Calculation\n", "Il=Vl/Rl #lamp current(mA)\n", "Vout=Il*(Rf+Rl) #output voltage of oscillator(V)\n", "\n", - "#Result\n", "print 'Lamp current = ',Il,'mA'\n", "print 'output voltage of oscillator = ',Vout,'Vrms'" ], @@ -114,21 +104,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 23.3.py\n", - "#What is frequency of oscillation, feedback fraction & voltage gain needed to start oscillating.\n", "\n", - "#Variable declaration\n", "C1=0.001*10**-6 #capacitance in oscillator(F)\n", "C2=0.01*10**-6 #capacitance in oscillator(F)\n", "L=15*10**-6 #inductance(H)\n", "\n", - "#Calculation\n", "C=C1*C2/(C1+C2) #equivalent capacitance(F)\n", "fr=(2*math.pi*((L*C)**0.5))**-1 #oscillation frequency(Hz)\n", "B=C1/C2 #feedback fraction\n", "Av_min=C2/C1 #minimum voltage gain\n", "\n", - "#Result\n", "print 'feedback fraction B = ',B\n", "print 'oscillation frequency fr = ',round((fr*10**-6),2),'MHz'\n", "print 'minimum voltage gain Av(min) = ',Av_min" @@ -160,20 +145,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 23.4.py\n", - "#50 pF is added in series with 15uH inductor. what is the frequency of oscillation?\n", "\n", - "#Variable declaration\n", "C1=0.001*10**-6 #capacitance in oscillator(F)\n", "C2=0.01*10**-6 #capacitance in oscillator(F)\n", "C3=50.0*10**-12 #capacitance in oscillator(F)\n", "L=15*10**-6 #inductance(H)\n", "\n", - "#Calculation\n", "C=(C1**-1+C2**-1+C3**-1)**-1 #equivalent capacitance(F)\n", "fr=(2*math.pi*((L*C)**0.5))**-1 #oscillation frequency(Hz)\n", "\n", - "#Result\n", "print 'oscillation frequency fr = ',round((fr*10**-6),2),'MHz'" ], "language": "python", @@ -201,24 +181,18 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 23.5.py\n", - "#A crystal has values L=3H, Cs=0.05pF, R=2KOhm,Cm=10pF.\n", - "#what are the series and parallel resonant frequencies of the crystal?\n", "\n", "import math\n", "\n", - "#Variable declaration\n", "Cs=0.05*10**-12 #series capacitance in oscillator(F)\n", "Cm=10.0*10**-12 #capacitance in oscillator(F)\n", "R=2.0*10**3 #resistance in oscillator(Ohm)\n", "L=3 #inductance(H)\n", "\n", - "#Calculation\n", "fs=(2*math.pi*((L*Cs)**0.5))**-1 #series resonant frequency(Hz)\n", "Cp=Cs*Cm/(Cs+Cm) #equvalent parallel capacitance(F)\n", "fp=(2*math.pi*((L*Cp)**0.5))**-1 #parallel resonant frequency(Hz)\n", "\n", - "#Result\n", "print 'series resonant frequency fs = ',math.ceil(fs*10**-3),'KHz'\n", "print 'parallel resonant frequency fp = ',math.ceil(fp*10**-3),'KHz'" ], @@ -248,21 +222,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 22.9.py\n", - "#VCC=12 V, R=33KOhm, C=0.47 uF. What is minimum trigger voltage that produces an output pulse?\n", - "#what is maximum capacitor voltage & width of output pulse?\n", "\n", - "#Variable declaration\n", "VCC=12.0 #given supply voltage(V)\n", "R=33*10**3 #given resistance(Ohm)\n", "C=0.47*10**-6 #given capacitance(F)\n", "\n", - "#Calculation\n", "LTP=VCC/3 #trip point LTP (V)\n", "UTP=2*LTP #trip point UTP (V)\n", "W=1.1*R*C #pulse width of output(s)\n", "\n", - "#Result\n", "print 'trigger voltage LTP = ',LTP,'V'\n", "print 'trigger voltage UTP = ',UTP,'V'\n", "print 'pulse width W = ',W*10**3,'ms'" @@ -294,17 +262,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 23.7.py\n", - "#what is the pulse width in figure 23-24 if R=10MOhm and C=470 uF?\n", "\n", - "#Variable declaration\n", "R=10*10**6 #given resistance(Ohm)\n", "C=470*10**-6 #given capacitance(F)\n", "\n", - "#Calculation\n", "W=1.1*R*C #pulse width of output(s)\n", "\n", - "#Result\n", "print 'pulse width W = ',W,'s = ',round((W/3600),2),'hours'" ], "language": "python", @@ -332,19 +295,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 23.8.py\n", - "#R1=75KOhm, R2=30KOhm, C=47nF. what is frequency of the output signal & duty cycle?\n", "\n", - "#Variable declaration\n", "R1=75.0*10**3 #given resistance1(Ohm)\n", "R2=30.0*10**3 #given resistance2(Ohm)\n", "C=47.0*10**-9 #given capacitance(F)\n", "\n", - "#Calculation\n", "f=1.44/((R1+(2*R2))*C) #frequency (Hz)\n", "D=(R1+R2)/(R1+(2*R2)) #duty cycle \n", "\n", - "#Result\n", "print 'frequency f = ',round(f,2),'Hz' \n", "print 'duty cycle D = ',round((D*100),2),'%'" ], @@ -374,12 +332,9 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 23.9.py\n", - "#what are the frequency & duty cycle when Vcon is 11V & 1V?\n", "\n", "import math\n", "\n", - "#Variable declaration\n", "VCC=12.0 #given supply voltage(V)\n", "R1=75.0*10**3 #given resistance1(Ohm)\n", "R2=30.0*10**3 #given resistance2(Ohm)\n", @@ -387,19 +342,15 @@ "Vcon1=11 #given Vcon(V) \n", "Vcon2=1 #given Vcon(V) \n", "\n", - "#Calculation\n", - "#for Vcon=11V\n", "W1=-(R1+R2)*C*(math.log((VCC-Vcon1)/(VCC-(0.5*Vcon1)))) #pulse width(s)\n", "T1=W1+(0.693*R2*C) #period(s)\n", "D1=W1/T1 #duty cycle\n", "f1=1/T1 #frequency(Hz)\n", - "#for Vcon=11V\n", "W2=-(R1+R2)*C*(math.log((VCC-Vcon2)/(VCC-(0.5*Vcon2)))) #pulse width(s)\n", "T2=W2+(0.693*R2*C) #period(s)\n", "D2=W2/T2 #duty cycle\n", "f2=1/T2 #frequency(Hz)\n", "\n", - "#Result\n", "print 'For Vcon = 11V,'\n", "print 'frequency f = ',round(f1,2),'Hz'\n", "print 'duty cycle D = ',round((D1*100),2),'%'\n", @@ -437,19 +388,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 23.10.py\n", - "#VCC=12V, R=9.1KOhm, C=0.01uF. clock frequency is 2.5KHz.\n", - "#if modulating signal has peak value of 2V, what is the period of output pulses, quiescent pulse width,\n", - "#minimum & maximum pulse widths & duty cycles?\n", "\n", - "#Variable declaration\n", "VCC=12.0 #given supply voltage(V)\n", "R=9.1*10**3 #given resistance(Ohm)\n", "C=0.01*10**-6 #given capacitance(F)\n", "f=2.5*10**3 #given frequency(Hz)\n", "Vmod=2 #peak value of modulating signal(V) \n", "\n", - "#Calculation\n", "T=1/f #period of output pulse(s)\n", "W=1.1*R*C #pulse width(s)\n", "UTP_max=(2*VCC/3)+Vmod #maximum UTP(V)\n", @@ -459,7 +404,6 @@ "Dmin=Wmin/T #minimum duty cycle\n", "Dmax=Wmax/T #maximum duty cycle\n", "\n", - "#Result\n", "print 'period of output pulse T = ',T*10**6,'us'\n", "print 'Quiscent pulse width W = ',W*10**6,'us'\n", "print 'minimum UTP = ',UTP_min,'V'\n", @@ -501,19 +445,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 23.11.py\n", - "#VCC=12V, R1=3.9KOhm,R2=3KOhm, C=0.01uF.\n", - "#if modulating signal has peak value of 1.5V, what is the period of output pulses, quiescent pulse width,\n", - "#minimum & maximum pulse widths & space between pulses?\n", "\n", - "#Variable declaration\n", "VCC=12.0 #given supply voltage(V)\n", "R1=3.9*10**3 #given resistance(Ohm)\n", "R2=3*10**3 #given resistance(Ohm)\n", "C=0.01*10**-6 #given capacitance(F)\n", "Vmod=1.5 #peak value of modulating signal(V) \n", "\n", - "#Calculation \n", "W=0.693*(R1+R2)*C #pulse width(s)\n", "T=0.693*(R1+(2*R2))*C #period of output pulse(s)\n", "UTP_max=(2*VCC/3)+Vmod #maximum UTP(V)\n", @@ -524,7 +462,6 @@ "Tmax=Wmax+(0.693*R2*C) #maximum period(s)\n", "s=0.693*R2*C #space(s)\n", "\n", - "#Result\n", "print 'period of output pulse T = ',T*10**6,'us'\n", "print 'Quiscent pulse width W = ',W*10**6,'us'\n", "print 'minimum UTP = ',UTP_min,'V'\n", @@ -568,21 +505,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 23.12.py\n", - "#A ramp generator of figure 23-43 has a constant collector current of 1mA. If VCC=15V, C=100nF. \n", - "#what is slope of output ramp, its peak value & its duration?\n", "\n", - "#Variable declaration\n", "VCC=15.0 #given supply voltage(V)\n", "C=100*10**-9 #given capacitance(F)\n", "Ic=1*10**-3 #collector current (A)\n", "\n", - "#Calculation \n", "S=Ic/C #slope(V/s) \n", "V=2*VCC/3 #peak value(V)\n", "T=V/S #duration of ramp(s) \n", "\n", - "#Result\n", "print 'slope is ',S/1000,'V/ms'\n", "print 'Peak value V = ',V,'V'\n", "print 'duration of ramp = ',T*10**3,'ms'" @@ -614,17 +545,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 23.13.py\n", - "#In figure 23-50, R=10KOhm,C=0.01uF with s1 closed, what are the output waveforms and frequency at pins 2 & 11?\n", "\n", - "#Variable declaration\n", "R=10*10**3 #given resistance(Ohm)\n", "C=0.01*10**-6 #given capacitance(F)\n", "\n", - "#Calculation \n", "f0=(R*C)**-1 #output frequency(Hz)\n", "\n", - "#Result\n", "print 'output frequency f0 = ',f0/1000,'KHz' " ], "language": "python", @@ -652,19 +578,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 23.14.py\n", - "#In figure 23-51, R1=1KOhm,R2=2KOhm,C=0.1uF,Determine square wave output frequency & duty cycle.\n", "\n", - "#Variable declaration\n", "R1=1.0*10**3 #given resistance(Ohm)\n", "R2=2.0*10**3 #given resistance(Ohm)\n", "C=0.1*10**-6 #given capacitance(F)\n", "\n", - "#Calculation \n", "f=(2/C)*((R1+R2)**-1) #output frequency(Hz)\n", "D=R1/(R1+R2) #duty cycle\n", "\n", - "#Result\n", "print 'output frequency f = ',round((f/1000),2),'KHz' \n", "print 'duty cycle = ',round((D*100),2),'%'" ], diff --git a/Electronic_Principles_/Chapter_24_New.ipynb b/Electronic_Principles_/Chapter_24_New.ipynb index 7b020fb6..ab177723 100644 --- a/Electronic_Principles_/Chapter_24_New.ipynb +++ b/Electronic_Principles_/Chapter_24_New.ipynb @@ -27,24 +27,18 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 24.1.py\n", - "#Vin=15V, Rs=10 Ohm, Vz=9.1V, VBE=0.8V, RL=40 Ohm.\n", - "#what are the value of Vout, Iin, IL, IC.\n", "\n", - "#Variable declaration\n", "Rs=10 #given source resistance Rs(Ohm)\n", "RL=40 #given load resistance RL(Ohm)\n", "Vin=15 #input voltage(V)\n", "VBE=0.8 #base-emitter voltage drop(V) \n", "Vz=9.1 #voltage across diode(V)\n", "\n", - "#Calculation\n", "Vout=Vz+VBE #output voltage(V) \n", "Is=1000*(Vin-Vout)/Rs #input current(mA) \n", "IL=1000*Vout/RL #load current(mA)\n", "IC=Is-IL #collector current(mA)\n", "\n", - "#Result\n", "print 'Output voltage Vout = ',Vout,'V'\n", "print 'input current Is = ',Is,'mA'\n", "print 'load current IL = ',IL,'mA'\n", @@ -78,11 +72,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 24.2.py\n", - "#Vin=15V, Rs=10 Ohm, Vz=6.2V, VBE=0.81V, RL=40 Ohm , R1=750 Ohm, R2=250 Ohm.\n", - "#what are the value of Vout, Iin, IL, IC.\n", "\n", - "#Variable declaration\n", "Rs=10 #given source resistance Rs(Ohm)\n", "RL=40 #given load resistance RL(Ohm)\n", "Vin=15 #input voltage(V)\n", @@ -91,13 +81,11 @@ "R1=750 #base input resistance(Ohm)\n", "R2=250 #base input resistance(Ohm)\n", "\n", - "#Calculation\n", "Vout=(Vz+VBE)*(R1+R2)/R1 #output voltage(V) \n", "Is=1000*(Vin-Vout)/Rs #input current(mA) \n", "IL=1000*Vout/RL #load current(mA)\n", "IC=Is-IL #collector current(mA)\n", "\n", - "#Result\n", "print 'Output voltage Vout = ',round(Vout,2),'V'\n", "print 'input current Is = ',round(Is,2),'mA'\n", "print 'load current IL = ',round(IL,2),'mA'\n", @@ -131,24 +119,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 24.3.py\n", - "#What is the approximate efficiency in the preceding example?\n", - "#How much power does the regulator dissipate?\n", "\n", - "#Variable declaration\n", - "#data from preceding example\n", "Vout=9.35 #output voltage(V)\n", "IL=234 #load current(mA)\n", "Is=565 #input current(mA)\n", "Vin=15.0 #input voltage(V)\n", "\n", - "#Calculation\n", "Pout=Vout*IL/1000 #output power(W)\n", "Pin=Vin*Is/1000 #input power(W)\n", "eff=Pout/Pin #efficiency\n", "preg=Pin-Pout #power dissipated by regulator(W)\n", "\n", - "#Result\n", "print 'input power Pin = ',Pin,'W'\n", "print 'Output power Pout = ',round(Pout,2),'W'\n", "print 'Effifciency = ',round((eff*100),2),'%'\n", @@ -182,11 +163,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 24.4.py\n", - "#Vin=15V, Rs=10 Ohm, Vz=6.8V, RL=40 Ohm , R1=7.5 KOhm, R2=2.5 KOhm.\n", - "#what are the value of Vout, Iin, IL, IC.\n", "\n", - "#Variable declaration\n", "Rs=10 #given source resistance Rs(Ohm)\n", "RL=40 #given load resistance RL(Ohm)\n", "Vin=15 #input voltage(V)\n", @@ -194,13 +171,11 @@ "R1=7.5*10**3 #base input resistance(Ohm)\n", "R2=2.5*10**3 #base input resistance(Ohm)\n", "\n", - "#Calculation\n", "Vout=Vz*(R1+R2)/R1 #output voltage(V) \n", "Is=1000*(Vin-Vout)/Rs #input current(mA) \n", "IL=1000*Vout/RL #load current(mA)\n", "IC=Is-IL #collector current(mA)\n", "\n", - "#Result\n", "print 'Output voltage Vout = ',round(Vout,2),'V'\n", "print 'input current Is = ',round(Is,2),'mA'\n", "print 'load current IL = ',round(IL,2),'mA'\n", @@ -234,20 +209,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 24.5.py\n", - "#Calculate maximum load currents for examples 24-1,2,4.\n", "\n", - "#Variable declaration\n", "Is1=510 #input current in ex. 24-1 (mA)\n", "Is2=565 #input current in ex. 24-2 (mA)\n", "Is4=593 #input current in ex. 24-4 (mA)\n", "\n", - "#Calculation\n", "Imax1=Is1 #maximum load current (mA) \n", "Imax2=Is2 #maximum load current (mA) \n", "Imax4=Is4 #maximum load current (mA) \n", "\n", - "#Result\n", "print 'maximum load current Imax1 = ',Imax1,'mA'\n", "print 'maximum load current Imax2 = ',Imax2,'mA'\n", "print 'maximum load current Imax4 = ',Imax4,'mA'" @@ -279,20 +249,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 24.6.py\n", - "#VNL=9.91V, VFL=9.81V, VHL=9.94V, and VLL=9.79V. What is load regulation & line regulation?\n", "\n", - "#Variable declaration\n", "VNL=9.91 #given VNL(V)\n", "VFL=9.81 #given VFL(V)\n", "VHL=9.94 #given VHL(V) \n", "VLL=9.79 #given VLL(V)\n", "\n", - "#Calculation\n", "LoR=(VNL-VFL)*100/VFL #Load regulation(%)\n", "LiR=(VHL-VLL)*100/VLL #Line regulation(%)\n", "\n", - "#Result\n", "print 'Load regulation = ',round(LoR,2),'%'\n", "print 'Line regulation = ',round(LiR,2),'%'" ], @@ -322,10 +287,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 24.7.py\n", - "#Calculate approx. output voltage in figure 24-14, what is the power dissipation in pass transistor?\n", "\n", - "#Variable declaration\n", "RL=40.0 #given load resistance RL(Ohm)\n", "VBE=0.7 #base-emitter voltage drop(V) \n", "Vz=6.2 #voltage across diode(V)\n", @@ -333,12 +295,10 @@ "R2=1.0 #base input resistance(KOhm)\n", "Vin=15 #input voltage(V)\n", "\n", - "#Calculation\n", "Vout=(Vz+VBE)*(R1+R2)/R1 #output voltage(V)\n", "IC=Vout/RL #transistor current(A)\n", "PD=(Vin-Vout)*IC #power dissipation(W)\n", "\n", - "#Result\n", "print 'Output voltage Vout = ',Vout,'V'\n", "print 'transistor current = load current = IC = ',IC*1000,'mA'\n", "print 'Power dissipation PD = ',PD,'W'" @@ -377,22 +337,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 24.3.py\n", - "#What is the approximate efficiency in the preceding example 24-7?\n", "\n", - "#Variable declaration\n", - "#data from preceding example\n", "Vout=9.2 #output voltage(V)\n", "IL=230 #load current(mA)\n", "Vin=15.0 #input voltage(V)\n", "\n", - "#Calculation\n", "Pout=Vout*IL/1000 #output power(W)\n", "Pin=Vin*IL/1000 #input power(W)\n", "eff1=Pout/Pin #efficiency\n", "eff2=Vout/Vin #efficiency\n", "\n", - "#Result\n", "print 'input power Pin = ',Pin,'W'\n", "print 'Output power Pout = ',Pout,'W'\n", "print 'Effifciency 1= ',round((eff1*100),2),'%'\n", @@ -426,10 +380,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 24.9.py\n", - "#What is the approx. output voltage in figure 24-15,Why is a darlington transistor is used?\n", "\n", - "#Variable declaration\n", "RL=4.0 #given load resistance RL(Ohm)\n", "Vz=5.6 #voltage across diode(V)\n", "R1=2.7 #base input resistance(KOhm)\n", @@ -437,12 +388,10 @@ "Vin=15 #input voltage(V)\n", "B=100 #current gain\n", "\n", - "#Calculation\n", "Vout=Vz*(R1+R2)/R1 #output voltage(V)\n", "IL=Vout/RL #load current(A)\n", "IB=IL/B #base current(A)\n", "\n", - "#Result\n", "print 'Output voltage Vout = ',round(Vout,2),'V'\n", "print 'Load current IL = ',round(IL,2),'A'\n", "print 'base current IB = ',round((IB*1000),2),'mA'" @@ -474,20 +423,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 24.10.py\n", - "#VNL=10.16V, VFL=10.15V, VHL=10.16V, and VLL=10.07V. What is load regulation & line regulation?\n", "\n", - "#Variable declaration\n", "VNL=10.16 #given VNL(V)\n", "VFL=10.15 #given VFL(V)\n", "VHL=10.16 #given VHL(V) \n", "VLL=10.07 #given VLL(V)\n", "\n", - "#Calculation\n", "LoR=(VNL-VFL)*100/VFL #Load regulation(%)\n", "LiR=(VHL-VLL)*100/VLL #Line regulation(%)\n", "\n", - "#Result\n", "print 'Load regulation = ',round(LoR,3),'%'\n", "print 'Line regulation = ',round(LiR,2),'%'" ], @@ -517,11 +461,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 24.11.py\n", - "#vin can vary from 17.5 to 22.5V, what is the maximum zener current, min & max regulated output voltages?\n", - "#If regulated voltage is 12.5V, what is the load resistance where current limiting starts & approx. shorted-load current?\n", "\n", - "#Variable declaration\n", "RL=3.0 #given load resistance RL(Ohm)\n", "Vz=4.7 #voltage across diode(V)\n", "R11=1750 #base input resistance with max. potentiometer(Ohm)\n", @@ -534,7 +474,6 @@ "Vcs=0.7 #voltage across current sensing resistor(V)\n", "Vo=12.5 #regulated voltage given(V)\n", "\n", - "#Calculation\n", "Iz=(Vin-Vz)/Rs #max. zener current(A)\n", "Vout1=Vz*(R11+R2)/R11 #min. regulated output voltage(V)\n", "Vout2=Vz*(R12+R2)/R12 #max. regulated output voltage(V)\n", @@ -542,7 +481,6 @@ "RL1=Vo/IL #load resistance(Ohm)\n", "ISL=Vcs/RL #shorted-load current(A)\n", "\n", - "#Result\n", "print 'maximum zener current Iz = ',round((Iz*1000),2),'mA'\n", "print 'Load current IL = ',IL*1000,'mA'\n", "print 'load resistance RL = ',RL1,'Ohm'\n", @@ -576,10 +514,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 24.12.py\n", - "#what is load current in figure 24-21? what is the output ripple?\n", "\n", - "#Variable declaration\n", "Vout=12.0 #regulated output voltage(V)\n", "RL=100.0 #given load resistance RL(Ohm)\n", "\n", @@ -587,13 +522,11 @@ "f=120 #frequency(Hz)\n", "RR_dB=72.0 #ripple rejection(dB)\n", "\n", - "#Calculation \n", "IL=Vout/RL #load current(A)\n", "VRi=IL/(f*C) #peak to peak input ripple (V)\n", "RR=10**(RR_dB/20) #ripple rejection\n", "VRo=VRi/RR #peak to peak output ripple (V)\n", "\n", - "#Result\n", "print 'Load current IL = ',IL*1000,'mA'\n", "print 'peak to peak input ripple = ',VRi,'V'\n", "print 'peak to peak output ripple = ',round((VRo*1000),2),'mV'" @@ -625,19 +558,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 24.13.py\n", - "#If R1=2KOhm, R2=22KOhm in figure 24-20, what is the output voltage? If R2 is increased to 46 KOhm. What is the output voltage?\n", "\n", - "#Variable declaration\n", "R1=2.0 #given resistance(KOhm)\n", "R2=22.0 #given resistance(KOhm)\n", "R21=46.0 #given resistance increased(KOhm)\n", "\n", - "#Calculation\n", "Vout1=1.25*(R1+R2)/R1 #output voltage(V)\n", "Vout2=1.25*(R1+R21)/R1 #output voltage with increased R2(V)\n", "\n", - "#Result\n", "print 'Output voltage Vout1 = ',Vout1,'V'\n", "print 'output voltage with increased R2, Vout2 = ',Vout2,'V' " ], @@ -667,21 +595,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 24.14.py\n", - "#The LM7805 can regulate to specifications with input voltage between 7.5 & 20V.\n", - "#what is the maximum & minimum efficiency? \n", "\n", - "#Variable declaration\n", - "#data from preceding example\n", "Vout=5.0 #output voltage(V)\n", "Vin_min=7.5 #min. input voltage(V)\n", "Vin_max=20.0 #max. input voltage(V)\n", "\n", - "#Calculation\n", "eff_max=Vout/Vin_min #maximum efficiency\n", "eff_min=Vout/Vin_max #minimum efficiency\n", "\n", - "#Result\n", "print 'Minimum Effifciency = ',eff_min*100,'%'\n", "print 'Maximum Effifciency = ',round((eff_max*100),2),'%'" ], @@ -711,19 +632,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 24.15.py\n", - "#R1=2.21 KOhm, R2=2.8 KOhm, what is the output voltage, minimum input voltage that can be used with the output voltage?\n", "\n", - "#Variable declaration\n", "R1=2.21 #given resistance(KOhm)\n", "R2=2.8 #given resistance(KOhm)\n", "R21=46.0 #given resistance increased(KOhm)\n", "VREF=2.21 #Reference voltage(V)\n", "\n", - "#Calculation\n", "Vout=VREF*(R1+R2)/R1 #output voltage(V)\n", "\n", - "#Result\n", "print 'Output voltage Vout = ',Vout,'V'\n", "print 'Input voltage should be 2V greater than output voltage So, Vin = 7 V'" ], @@ -753,18 +669,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 24.15.py\n", - "#In buck-boost regulator of figure 24-32, If R1=1 KOhm, R2=5.79 KOhm, what is the output voltage? \n", "\n", - "#Variable declaration\n", "R1=1 #given resistance(KOhm)\n", "R2=5.79 #given resistance(KOhm)\n", "VREF=2.21 #Reference voltage(V)\n", "\n", - "#Calculation\n", "Vout=VREF*(R1+R2)/R1 #output voltage(V)\n", "\n", - "#Result\n", "print 'Output voltage Vout = ',round(Vout,2),'V'" ], "language": "python", diff --git a/Electronic_Principles_/Chapter_2_New.ipynb b/Electronic_Principles_/Chapter_2_New.ipynb index cf7eaae1..4404a233 100644 --- a/Electronic_Principles_/Chapter_2_New.ipynb +++ b/Electronic_Principles_/Chapter_2_New.ipynb @@ -27,23 +27,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 2.5.py\n", - "#A barrier potential of 0.7V at an ambient temperature of 25 deg C,\n", - "#Find arrier potential of a silicon diode when the junction temperature is 100 deg C. At 0 deg C.\n", "\n", - "#Variable declaration\n", "Tj=100 #junction temperature 1(C)\n", "Vb=0.7 #Barrier potential(V)\n", "Tamb=25 #Ambient temperature(C)\n", "T1=0 #junction temperature 2(C)\n", "\n", - "#Calculation\n", "Vd=-0.002*(Tj-Tamb) #Change in barrier potential(V)\n", "Vbn=Vb+Vd #Barrier potential(V)\n", "Vd1=-0.002*(T1-Tamb) #Change in barrier potential(V)\n", "Vb1n=Vb+Vd1 #Barrier potential(V)\n", "\n", - "#Result\n", "print 'Change in barrier potential = Vd =',Vd,'V'\n", "print 'Brrier potential = Vbn =',Vbn,'V'\n", "print 'For junction temperature 0 C'\n", @@ -79,21 +73,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 2.6.py\n", - "#A silicon diode has a saturation current of 5 nA at 25 deg C. What is the saturation current at 100 deg C?\n", "\n", "\n", - "#Variable declaration\n", "T2=100 #Temperature(C)\n", "T1=25 #Temperature(C)\n", "Isat1=5 #Current(nA)\n", "\n", - "#Calculation\n", "Td=T2-T1 #Temperature change(C)\n", "Is1=(2**7)*Isat1 #Current(nA)\n", "Is2=(1.07**5)*Is1 #Current(nA)\n", "\n", - "#Result\n", "print 'Change in temperature = Td = T2-T1 =',Td,'C'\n", "print 'For first 70 C change seven doublings are there.'\n", "print 'Is1 = (2^7)*Isat1 =',Is1,'nA'\n", @@ -129,20 +118,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 2.7.py\n", - "#surface-leakage current is 2nA for a reverse voltage of 25 V, \n", - "#find surface leakage current for a reverse voltage of 35V.\n", "\n", - "#Variable declaration\n", "Isl=2*(10**-9) #surface leakage current(nA)\n", "Vr=25 #Reverse voltage(V)\n", "Vr1=35 #Reverse voltage(V)\n", "\n", - "#Calculation\n", "Rsl=Vr/Isl #surface leakage reistance(Ohm)\n", "Isl1=(Vr1/Rsl)*(10**9) #surface leakage current(nA)\n", "\n", - "#Result\n", "print 'surface-leakage reistance Rsl = Vr/Isl =',Rsl*10**-6,'MOhm'\n", "print 'for Vr1 = 35 V,'\n", "print 'surface-leakage reistance Isl1 = Vr1/Rsl =',Isl1,'nA'" diff --git a/Electronic_Principles_/Chapter_3_New.ipynb b/Electronic_Principles_/Chapter_3_New.ipynb index e2552e78..e4397d8b 100644 --- a/Electronic_Principles_/Chapter_3_New.ipynb +++ b/Electronic_Principles_/Chapter_3_New.ipynb @@ -27,19 +27,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 3.2.py\n", - "#A diode has a power rating of 5W. If diode voltage is 1.2V and diode current is 1.75A,\n", - "#What is the power dissipation? Will the diode be destroyed?\n", "\n", - "#Variable declaration\n", "Pr=5 #Power rating(W)\n", "Vd=1.2 #diode voltage(V)\n", "Id=1.75 #diode current(A)\n", "\n", - "#Calculation\n", "PD=Vd*Id #Power dissipaion(W)\n", "\n", - "#Result\n", "print 'Power Dissipation =',PD,'W'\n", "print 'PD(',PD,'W) < ''Pr(',Pr,'W), So diode will not be destroyed.'" ], @@ -69,19 +63,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 3.3.py\n", - "#Use the ideal diode to calculate the VL & IL in Fig. 3-6a.\n", "\n", "\n", - "#Variable declaration\n", "Vs=10 #Source voltage(V)\n", "RL=1 #Load resistance(KOhm)\n", "VL=Vs #LOad voltage(V)\n", "\n", - "#Calculation\n", "IL=VL/RL #Load current(mA)\n", "\n", - "#Result\n", "print 'Vs will be appearing across RL'\n", "print 'Load voltage VL =',Vs,'V'\n", "print 'Load current IL =',IL,'mA'" @@ -113,24 +102,19 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 3.4.py\n", - "#Calculate the VL & IL in Fig. 3-6b using an ideal diode.\n", "\n", - "#Variable Declaration\n", "print 'As per figure 3-6b, Thevenize the circuit to the left of the diode'\n", "R1=6 #Resistance(KOhm)\n", "R2=3 #Resistance(KOhm)\n", "RL=1 #Load Resistance(KOhm)\n", "Vs=36 #Supply voltage(V)\n", "\n", - "#Calculation\n", "Vth=R2*Vs/(R1+R2) #ThCevenin voltage(V)\n", "Rth=(R1*R2)/(R1+R2) #Thevenin resistance(KOhm)\n", "Rt=Rth+RL #total resistance(KOhm)\n", "IL=Vth/Rt #Load current(mA)\n", "VL=IL*RL #Load voltage(V)\n", "\n", - "#Result\n", "print 'Vth =',Vth,'V & Rth =',Rth,'KOhm'\n", "print 'Visualize diode as closed switch,'\n", "print 'IL =',IL,'mA'\n", @@ -165,21 +149,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 3.5.py\n", - "#Use the second approximation to calculate the VL, IL & PD in Fig 3-8. \n", "\n", - "#Variable Declaration\n", "print 'As per Second approximation in Fig.3-8,'\n", "Vd=0.7 #diode voltgage(V)\n", "Vs=10 #supply voltage(V)\n", "RL=1 #Load resistance(KOhm)\n", "\n", - "#Calculation\n", "VL=Vs-Vd #Load voltage(v)\n", "IL=VL/RL #Load current(mA)\n", "PD=Vd*IL #diode power(mW)\n", "\n", - "#Result\n", "print 'IL =',IL,'mA & VL =',VL,'V'\n", "print 'Diode power PD =',PD,'mW'" ], @@ -210,10 +189,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 3.6.py\n", - "#Calculate the VL, IL & PD in fig. 3-9a using the second approximation.\n", "\n", - "#Variable Declaration\n", "print 'As per Second approximation in Fig.3-9a,'\n", "Vd=0.7 #diode voltgage(V)\n", "Vs=36 #supply voltage(V)\n", @@ -221,14 +197,12 @@ "R2=3 #Resistance(KOhm)\n", "RL=1 #Load resistance(KOhm)\n", "\n", - "#Calculation\n", "Vth=R2*Vs/(R1+R2)#Thevenin Voltage(V)\n", "Rth=(R1*R2)/(R1+R2)#Thevenin resistance(KOhm)\n", "IL=(Vth-Vd)/R2#Load current(mA)\n", "VL=IL*RL#Load voltage(V)\n", "PD=Vd*IL#diode power(mW)\n", "\n", - "#Result\n", "print 'Thevenize the circuit to the left of the diode'\n", "print 'Vth =',Vth,'V & Rth =',Rth,'KOhm'\n", "print 'VL =',round(VL,2),'V & IL =',round(IL,2),'mA'\n", @@ -263,17 +237,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 3.7.py\n", - "#The IN4001 has a bulk resistance of 0.23 Ohm. What is VL, IL & PD?\n", "\n", - "#Variable Declaration\n", "print 'In Fig.3-11a,'\n", "Vd=0.7 #diode voltgage(V)\n", "Vs=10 #supply voltage(V)\n", "RL=1000L #Load resistance(Ohm)\n", "Rb=0.23 #bulk resistance\n", "\n", - "#Calculation\n", "print 'As per third approximation, we get fig.3-11b'\n", "if Rb<(RL/100):\n", " print'If Rb < 0.01RL than ignore Rb & use second approximation.'\n", @@ -281,7 +251,6 @@ " IL=(VL/RL)*1000 #Load current(mA)\n", " PD=Vd*IL #diode power(mW)\n", "\n", - "#Result \n", " print 'IL =',IL,'mA & VL =',VL,'V'\n", " print 'Diode power PD =',PD,'mW'" ], @@ -314,10 +283,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 3.8.py\n", - "#Repeat the preceding example for RL of 10 Ohm.\n", "\n", - "#Variable Declaration\n", "print 'In Fig.3-11a, take RL = 10 Ohm'\n", "Vd=0.7 #diode voltgage(V)\n", "Vs=10 #supply voltage(V)\n", @@ -326,14 +292,12 @@ "RT=Rb+RL #Total reistance(Ohm)\n", "VT=Vs-Vd #total voltage(V)\n", "\n", - "#Calculation\n", "print 'RT =',RT,'Ohm & VT =',VT,'V'\n", "IL=VT/RT #Load current(mA)\n", "VL=IL*RL #Load voltage(V)\n", "VD=Vd+(IL*Rb) \n", "PD=VD*IL #diode power(W)\n", "\n", - "#Result\n", "print 'IL =',round(IL,2),'mA & VL =',round(VL,2),'V'\n", "print 'VD =',round(VD,2),'V'\n", "print 'Diode power PD =',round(PD,2),'W'" diff --git a/Electronic_Principles_/Chapter_4_New.ipynb b/Electronic_Principles_/Chapter_4_New.ipynb index af0210e1..b02a4e3e 100644 --- a/Electronic_Principles_/Chapter_4_New.ipynb +++ b/Electronic_Principles_/Chapter_4_New.ipynb @@ -27,23 +27,18 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 4.1.py\n", - "#Calculate peak load voltage and the dc load voltage.\n", "\n", "import math\n", "\n", - "#Variable declaration\n", "Vrms=10 #RMS Value of sine wave(V)\n", "f=60 #frequency(Hz)\n", "\n", - "#Calculation\n", "Vp=Vrms/0.707 #peak source voltage(V)\n", "Vpout=Vp #peak load voltage(V)\n", "Vdc=Vp/math.pi #dc load voltage(V)\n", "Vpouts=Vp-0.7 #peak load voltage in 2nd approx.\n", "Vdc=Vpouts/math.pi #dc load voltage(V)\n", "\n", - "#Result\n", "print 'Vp=',round(Vp,2),'V'\n", "print 'With an ideal diode, Vpout =',round(Vpout,2),'V'\n", "print 'DC load voltage, Vdc =',round(Vdc,2),'V'\n", @@ -79,15 +74,11 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 4.2.py\n", - "#What are the peak load voltage and dc load voltage in Figure 4.5?\n", "\n", "import math\n", "\n", - "#Variable declaration\n", "Vs=120 #supply voltage(V)\n", "\n", - "#Calculation\n", "V2=Vs/5 #Secondary voltage(V)\n", "Vp=V2/0.707 #peak secondary voltage\n", "Vpout=Vp #peak load voltage(V)\n", @@ -95,7 +86,6 @@ "Vpouts=Vp-0.7 #peak load voltage in 2nd approx.(V)\n", "Vdc2=Vpouts/math.pi #dc load voltage(V)\n", "\n", - "#Result\n", "print 'As per fig.4-5, Transformer turns ratio is 5:1'\n", "print 'V2=',round(V2,2),'V'\n", "print 'Vp=',round(Vp,2),'V'\n", @@ -135,21 +125,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 4.3.py\n", - "#Figure 4.7 shows full wave rectifier, Calculate the peak input and output voltages.\n", "\n", - "#Variable declaration\n", "Vrms=120 #RMS value of supply(V)\n", "N12=10 #turn ratio\n", "\n", - "#Calculation\n", "Vp1=Vrms/0.707 #peak primary voltage(V)\n", "Vp2=Vp1/N12 #peak secondary voltage(V)\n", "Vpin=0.5*Vp2 #input voltage(V)\n", "Vpout=Vpin #Output voltage (V)\n", "Vpouts=Vpin-0.7 #Output voltage in 2nd approx.(V)\n", "\n", - "#Result\n", "print 'Peak primary voltage Vp1=',round(Vp1,2),'V'\n", "print 'Peak secondary voltage Vp2=',round(Vp2,2),'V'\n", "print 'Due to center-tap,' \n", @@ -187,21 +172,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 4.4.py\n", - "#Figure 4.7 shows full wave rectifier. If one of the diodes were open then, calculate the peak input and output voltages.\n", "\n", - "#Variable declaration\n", "Vrms=120 #RMS value of supply(V)\n", "N12=10 #turn ratio\n", "\n", - "#Calculation\n", "Vp1=Vrms/0.707 #peak primary voltage(V)\n", "Vp2=Vp1/N12 #peak secondary voltage(V)\n", "Vpin=0.5*Vp2 #input voltage(V)\n", "Vpout=Vpin #Output voltage(V)\n", "Vpouts=Vpin-0.7 #Output voltage in 2nd approx.(V)\n", "\n", - "#Result\n", "print 'Peak primary voltage Vp1=',round(Vp1,2),'V'\n", "print 'Peak secondary voltage Vp2=',round(Vp2,2),'V'\n", "print 'Due to one of the diodes were open, load voltage will be the half wave signal'\n", @@ -239,19 +219,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 4.5.py\n", - "#Calculate peak & output voltages in figure 4.9\n", "\n", - "#variable declaration\n", "Vrms=120 #RMS value of supply(V)\n", "N12=10 #turn ratio\n", "\n", - "#Calculation\n", "Vp1=Vrms/0.707 #peak primary voltage(V)\n", "Vp2=Vp1/N12 #peak secondary voltage(V)\n", "Vpout=Vp2 #Output voltage(V)\n", "\n", - "#Result\n", "print 'Peak primary voltage Vp1=',round(Vp1,2),'V'\n", "print 'Peak secondary voltage Vp2=',round(Vp2,2),'V'\n", "print 'secondary voltage is input of rectifier'\n", @@ -285,24 +260,19 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 4.6.py\n", - "#What is the dc load voltage and ripple in figure 4.14?\n", "\n", - "#Variable declaration\n", "Vrms=120 #RMS value of supply(V)\n", "N12=5 #turn ratio\n", "RL=5 #Load resistance(KOhm)\n", "C=100 #Capacitance(uF)\n", "f=60 #Frequency(Hz)\n", "\n", - "#Calculation\n", "V2=Vrms/N12 #RMS secondary voltage(V)\n", "Vp=V2/0.707 #peak secondary voltage(V)\n", "VL=Vp #dc load voltage(V)\n", "IL=VL/RL #Load current(mA)\n", "VR=(IL/(f*C))*(10**3) #ripple voltage(V)\n", "\n", - "#Result\n", "print 'RMS secondary voltage V2=',V2,'V'\n", "print 'Peak secondary voltage Vp=',round(Vp,2),'V'\n", "print 'with ideal diode and small ripple, dc load voltage, VL =',round(VL,2),'V'\n", @@ -342,24 +312,19 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 4.7.py\n", - "#What is the dc load voltage and ripple in figure 4.15?\n", "\n", - "#Variable declaration\n", "Vrms=120 #RMS value of supply(V)\n", "N12=5 #turn ratio\n", "RL=5 #Load resistance(KOhm)\n", "C=100 #Capacitance(uF)\n", "f=60 #Frequency(Hz)\n", "\n", - "#Calculation\n", "V2=Vrms/N12 #RMS secondary voltage(V)\n", "Vp=V2/0.707 #peak secondary voltage(V)\n", "VL=Vp/2 #dc load voltage(V)\n", "IL=VL/RL #Load current(mA)\n", "VR=(IL/(2*f*C))*(10**3) #ripple voltage(V)\n", "\n", - "#Result\n", "print 'RMS secondary voltage V2=',V2,'V'\n", "print 'Peak secondary voltage Vp=',round(Vp,2),'V'\n", "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'\n", @@ -401,24 +366,19 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 4.8.py\n", - "#What is the dc load voltage and ripple in figure 4.16?\n", "\n", - "#Variable declaration\n", "Vrms=120 #RMS value of supply(V)\n", "N12=5 #turn ratio\n", "RL=5 #Load resistance(KOhm)\n", "C=100 #Capacitance(uF)\n", "f=60 #Frequency(Hz)\n", "\n", - "#Calculation\n", "V2=Vrms/N12 #RMS secondary voltage(V)\n", "Vp=V2/0.707 #peak secondary voltage(V)\n", "VL=Vp #dc load voltage(V)\n", "IL=VL/RL #Load current(mA)\n", "VR=(IL/(2*f*C))*(10**3) #ripple voltage(V)\n", "\n", - "#Result\n", "print 'RMS secondary voltage V2=',V2,'V'\n", "print 'Peak secondary voltage Vp=',round(Vp,2),'V'\n", "print 'with ideal diode and small ripple, dc load voltage, VL =',round(VL,2),'V'\n", @@ -460,24 +420,19 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 4.9.py\n", - "#Calculate the dc load voltage and ripple in figure 4.17\n", "\n", - "#Variable declaration\n", "Vrms=120 #RMS value of supply(V)\n", "N12=15 #turn ratio\n", "RL=0.5 #Load resistance(KOhm)\n", "C=4700 #Capacitance(uF)\n", "f=60 #Frequency(Hz)\n", "\n", - "#Calculation\n", "V2=Vrms/N12 #RMS secondary voltage(V)\n", "Vp=V2/0.707 #peak secondary voltage(V)\n", "VL=Vp-1.4 #dc load voltage(V)\n", "IL=VL/RL #Load current(mA)\n", "VR=(IL/(2*f*C))*(10**3) #ripple voltage(V)\n", "\n", - "#Result\n", "print 'RMS secondary voltage V2=',V2,'V'\n", "print 'Peak secondary voltage Vp=',round(Vp,2),'V'\n", "print 'with ideal diode and small ripple & due to 1.4V across two conducting diodes actual dc voltage is, VL =',round(VL,2),'V'\n", @@ -517,21 +472,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 4.10.py\n", - "#What is the peak inverse voltage for turns ratio is 8:1?\n", - "#Breakdown voltage of 50V.\n", "\n", - "#Variable declaration\n", "Vrms=120 #RMS value of supply(V)\n", "N12=8 #turn ratio\n", "f=60 #Frequency(Hz)\n", "\n", - "#Calculation\n", "V2=Vrms/N12 #RMS secondary voltage(V)\n", "Vp=V2/0.707 #peak secondary voltage(V)\n", "PIV = Vp #Peak Inverse Voltage(V)\n", "\n", - "#Result\n", "print 'RMS secondary voltage V2=',V2,'V'\n", "print 'Peak inverse voltage PIV =',round(PIV,2),'V'\n", "print 'PIV << breakdown voltage(50V), So, it is safe to use IN4001'" diff --git a/Electronic_Principles_/Chapter_5_New.ipynb b/Electronic_Principles_/Chapter_5_New.ipynb index 44f83157..cfea03f3 100644 --- a/Electronic_Principles_/Chapter_5_New.ipynb +++ b/Electronic_Principles_/Chapter_5_New.ipynb @@ -27,23 +27,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 5.1.py\n", - "#Zener diode of figure 5.4a has breakdown voltage of 10V. \n", - "#What are the minimum & maximum zener currents? \n", "\n", - "#Variable declaration\n", "Vsmin=20 #Source voltage minimum(V)\n", "Vsmax=40 #Source voltage maximum(V)\n", "Vbd=10 #Breakdown voltage(V)\n", "R=0.82 #Resistance(KOhm)\n", "\n", - "#Calculation\n", "Vr1=Vsmin-Vbd #voltage across resistor(V)\n", "Is1=Vr1/R #Minimum current(mA)\n", "Vr2=Vsmax-Vbd #voltage across resistor(V)\n", "Is2=Vr2/R #Maximum current(mA)\n", "\n", - "#Result\n", "print 'Ideally, zener diode acts as a battery(of breakdown voltage = 10V) shown in figure 5-4b'\n", "print 'Minimum current Is1=',round(Is1,2),'mA'\n", "print 'Maximum current Is1=',round(Is2,2),'mA'" @@ -75,19 +69,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 5.2.py\n", - "#Is the zener diode of figure 5-6a operating in the breakdown region?\n", "\n", - "#Variable declaration\n", "Vs=18 #supply voltage(V)\n", "Rs=0.27 #source resistance(KOhm)\n", "RL=1 #Load resistance(KOhm)\n", "Vz=10 #Zener voltage(V)\n", "\n", - "#Calculation\n", "VTH=(RL/(Rs+RL))*Vs #Thevenin voltage(V)\n", "\n", - "#Result\n", "print 'Thevenin voltage VTH = ',round(VTH,2),'V'\n", "print 'Thevenin voltage is greater than zener voltage, zener diode is operating in breakdown region.'" ], @@ -117,22 +106,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 5.3.py\n", - "#What does the zener current equal in Figure 5-6b?\n", "\n", - "#Variable declaration\n", "Vs=18 #supply voltage(V)\n", "Rs=0.27 #source resistance(KOhm)\n", "RL=1 #Load resistance(KOhm)\n", "Vbd=10 #Zener voltage(V)\n", "\n", - "#Calculation\n", "Vr=Vs-Vbd #voltage across resistor(V)\n", "Is=Vr/Rs #Current(mA)\n", "IL=Vbd/RL #Current(mA)\n", "Iz=Is-IL #Zener current(mA)\n", "\n", - "#Result\n", "print 'Load current IL = ',IL,'mA'\n", "print 'Zener current Iz = ',round(Iz,2),'mA'" ], @@ -162,20 +146,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 5.7.py\n", - "#The zener diode of figure 5-12 has a breakdown voltage of 10V and a zener resistance of 8.5 Ohm.\n", - "#Use second approx. to calculate load voltage when zener current is 20 mA.\n", "\n", - "#Variable declaration\n", "Iz=20 #zener current(mA)\n", "Rz=8.5 #zener resistance(Ohm)\n", "Vbd=10 #Zener voltage(V)\n", "\n", - "#Calculation\n", "DVL=Iz*Rz/1000 #change in load voltage(V)\n", "VL=Vbd+DVL #Load voltage(V)\n", "\n", - "#Result\n", "print 'Change in load voltage DVL =',DVL,'V'\n", "print 'Load voltage with second approx., VL =',VL,'V'" ], @@ -205,19 +183,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 5.8.py\n", - "#In figure 5-12, Rs = 270 Ohm, Rz=8.5 Ohm and VR(in)=2V. \n", - "#What is the approximate ripple voltage across the load?\n", "\n", - "#Variable declaration\n", "Rs=270 #Source resistance (Ohm)\n", "Rz=8.5 #zener resistance(Ohm)\n", "VRin=2 #Zener voltage(V)\n", "\n", - "#Calculation\n", "VRout=(Rz/Rs)*VRin*1000 #Load ripple voltage(V)\n", "\n", - "#Result\n", "print 'Load ripple voltage VRout=',round(VRout,2),'mV'" ], "language": "python", @@ -245,21 +217,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 5.10.py\n", - "#A zener regulator has an i/p voltage varies from 22 to 30 V. \n", - "#If the regulated output voltage is 12 V & load resistance varies from 140 Ohm to 10 KOhm, Find maximum allowable series resistance.\n", "\n", - "#Variable declaration\n", "Vil=22 #input voltage range low(V)\n", "Vih=30 #input voltage range high(V)\n", "Vz=12 #regulated output voltage(V)\n", "Rl=140 #Load resistance low(KOhm)\n", "Rh=10 #Load resistance high(KOhm)\n", "\n", - "#Calculation\n", "RSmax=Rl*(float(Vil)/float(Vz)-1) #Maximum series resistance\n", "\n", - "#Result\n", "print 'Maximum series resistance RSmax =',round(RSmax,2),'V'" ], "language": "python", @@ -287,22 +253,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 5.11.py\n", "\n", - "#A zener regulator has an input voltage varies from 15 to 20 V. \n", - "#If zenerge is 6.8V and load current varies from 5 mA to 20 mA,find maximum allowable series resistance.\n", "\n", - "#Variable declaration\n", "Vil=15 #input voltage range low(V)\n", "Vih=20 #input voltage range high(V)\n", "Vz=6.8 #regulated output voltage(V)\n", "Il=5 #Load current low(mA)\n", "Ih=20 #Load current high(mA)\n", "\n", - "#Calculation\n", "RSmax=(Vil-float(Vz))/Ih*1000 #Maximum series resistance\n", "\n", - "#Result\n", "print 'Maximum series resistance RSmax =',RSmax,'V'" ], "language": "python", @@ -330,18 +290,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 5.12.py\n", - "#Figure 5-23a shows voltage-polarity tester. Find approx. LED current if the dc input voltage is 50V & series resistance is 2.2 KOhm.\n", "\n", - "#Variable declaration\n", "Vi=50 #voatage supply(V)\n", "Rs=2.2 #series resistance(KOhm)\n", "Vf=2 #forward approx. voltage\n", " \n", - "#Calculation\n", "Is=(Vi-Vf)/Rs\n", "\n", - "#Result\n", "print 'LED current Is =',round(Is,2),'mA'" ], "language": "python", @@ -369,18 +324,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 5.13.py\n", - "#Figure 5-23b shows continuity tester. find approx. LED current if the series resistance is 470 Ohm.\n", "\n", - "#Variable declaration\n", "Vs=9 #voatage supply(V)\n", "Rs=470.0 #series resistance(Ohm)\n", "Vf=2 #forward approx. voltage\n", " \n", - "#Calculation\n", "Is=(Vs-Vf)/Rs\n", "\n", - "#Result\n", "print 'LED current Is =',round((Is*1000),2),'mA'" ], "language": "python", @@ -408,23 +358,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 5.14.py\n", - "#In figure 5-24, find avg. LED current if the ac source voltage is 20V rms and series resistance is 680 Ohm.\n", - "#Also calculate approx. power dissipation in series resistor.\n", "\n", "import math\n", "\n", - "#Variable declaration\n", "Vac=20 #AC voatage supply(V)\n", "Rs=680.0 #series resistance(KOhm)\n", " \n", - "#Calculation\n", "Vacp=1.414*Vac #peak source voltage(V)\n", "Is1=(Vacp/Rs)*1000 #approx. peak current(mA)\n", "Is2=Is1/math.pi #average of half-wave current through LED(mA)\n", "P=(Vac)**2/Rs #Power dissipation(W)\n", "\n", - "#Result\n", "print 'approx. peak LED current Is1 =',round(Is1,2),'mA'\n", "print 'average of half-wave current through LED Is2 =',round(Is2,2),'mA'\n", "print 'Power dissipation P =',round(P,2),'W'" @@ -456,24 +400,18 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 5.15.py\n", - "#Figure 5-25, find capacitor is used instead of resistor. \n", - "#what is average LED current if the capacitance is 0.68 uf?\n", "\n", "import math\n", "\n", - "#Variable declaration\n", "Vs=120 #AC voatage supply(V)\n", "f=60 #frequency(Hz)\n", "C=0.68 #series resistance(KOhm)\n", " \n", - "#Calculation\n", "Xc=1/(2*math.pi*f*C)*1000 #capacitive reactance(KOhm)\n", "Vacp=Vs*1.414\n", "Is1=(Vacp/Xc) #approx. peak current(mA)\n", "Is2=Is1/math.pi #average current through LED(mA)\n", "\n", - "#Result\n", "print 'Capacitance reactance Xc = ',round(Xc,2),'KOhm'\n", "print 'approx. peak LED current Is1 =',round(Is1,2),'mA'\n", "print 'average current through LED Is2 =',round(Is2,2),'mA'" diff --git a/Electronic_Principles_/Chapter_6_New.ipynb b/Electronic_Principles_/Chapter_6_New.ipynb index 6cc29f0f..990f6ef8 100644 --- a/Electronic_Principles_/Chapter_6_New.ipynb +++ b/Electronic_Principles_/Chapter_6_New.ipynb @@ -27,17 +27,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 6.1.py\n", - "#A transistor has a collector current of 10 mA and a base current of 40 uA. find current gain. \n", "\n", - "#Variable declaration\n", "Ic=10 #collector current(mA)\n", "Ib=40.0/1000.0 #base current (mA)\n", "\n", - "#Calculation\n", "Bdc=Ic/Ib #Current gain\n", "\n", - "#Result\n", "print 'Current gain Bdc =',Bdc" ], "language": "python", @@ -65,17 +60,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 6.2.py\n", - "#A transistor has a currrent gain of 175 and a base current of 0.1 mA. find collector current. \n", "\n", - "#Variable declaration\n", "Bdc=175 #current gain\n", "Ib=0.1 #base current (mA)\n", "\n", - "#Calculation\n", "Ic=Bdc*Ib #Current gain\n", "\n", - "#Result\n", "print 'Collector current Ic =',Ic,'mA'" ], "language": "python", @@ -103,17 +93,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 6.3.py\n", - "#A transistor has a collector current of 2 mA. If the currrent gain of 135. find base current. \n", "\n", - "#Variable declaration\n", "Bdc=135.0 #current gain\n", "Ic=2.0 #collector current (mA)\n", "\n", - "#Calculation\n", "Ib=(Ic/Bdc)*1000 #Current gain\n", "\n", - "#Result\n", "print 'Base current Ib =',round(Ib,2),'uA'" ], "language": "python", @@ -141,21 +126,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 6.4.py\n", - "#Use the second approx. to calculate the base current in figure 6-8b. \n", - "#Find voltage across the base resistor & collector current if Bdc=200. \n", "\n", - "#Variable declaration\n", "Vbb=2 #base source voltage(V)\n", "Rb=100 #base resistor (KOhm)\n", "Bdc=200 #current gain\n", "Vbe=0.7 #base-emitter voltage drop(V)\n", "\n", - "#Calculation\n", "Ib=((Vbb-Vbe)/Rb)*1000 #base current(uA)\n", "Ic=Bdc*Ib/1000 #Collector current(mA)\n", "\n", - "#Result\n", "print 'Base current Ib =',Ib,'uA'\n", "print 'Collector current Ic =',Ic,'mA'" ], @@ -185,10 +164,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 6.5.py\n", - "#The transistor of Figure 6-11a has Bdc=300. Calculate IB,IC,VCE & PD\n", "\n", - "#Variable declaration\n", "VBB=10 #Base voltage (V)\n", "RC=2 #Collector resistance(KOhm)\n", "VCC=10 #collector voltage(V)\n", @@ -196,13 +172,11 @@ "RB=1 #base resistance (MOhm)\n", "VBE=0.7 #base-emitter voltage drop(V) \n", "\n", - "#Calculation\n", "IB=((VBB-VBE)/RB) #base current(uA)\n", "IC=Bdc*IB/1000 #Collector current(mA)\n", "VCE=VCC-(IC*RC) #Collector-emitter voltage(V)\n", "PD=VCE*IC #Collector power dissipation(W)\n", "\n", - "#Result\n", "print 'Base current IB =',IB,'uA'\n", "print 'Collector current IC =',IC,'mA'\n", "print 'Collector-emitter voltage VCE =',VCE,'V'\n", @@ -236,10 +210,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 6.6.py\n", - "#Calculate current gain of the 2N4424 shown in figure 6-12.\n", "\n", - "#Variable declaration\n", "VBB=10 #Base voltage (V)\n", "RC=470 #Collector resistance(Ohm)\n", "VCC=10 #collector voltage(V)\n", @@ -248,13 +219,11 @@ "RB=330 #base resistance (KOhm)\n", "VBE=0.7 #base-emitter voltage drop \n", "\n", - "#Calculation\n", "IB=((VBB-VBE)/RB)*1000 #base current(uA)\n", "V=VCC-VCE #voltage across Rc\n", "IC=(V/RC)*1000 #Collector current(mA)\n", "Bdc=int((IC/IB)*1000) #Collector-emitter voltage\n", "\n", - "#Result\n", "print 'Base current IB =',round(IB,2),'uA'\n", "print 'voltage across Rc VRc = ',round(V,2),'V'\n", "print 'Collector current IC =',round(IC,2),'mA'\n", @@ -288,10 +257,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 6.7.py\n", - "#What is the collector-emitter voltage in figure 6-14? Use the ideal transistor.\n", "\n", - "#Variable declaration\n", "VBB=15 #Base voltage (V)\n", "RC=3.6 #Collector resistance(KOhm)\n", "VCC=15 #collector voltage(V)\n", @@ -299,13 +265,11 @@ "RB=470 #base resistance (KOhm)\n", "VBE=0 #base-emitter voltage drop(V) \n", "\n", - "#Calculation\n", "IB=((VBB-VBE)/float(RB))*1000 #base current(uA)\n", "IC=Bdc*IB/1000 #Collector current(mA)\n", "VCE=VCC-(IC*RC) #Collector-emitter voltage(V)\n", "IE=IC+(IB/1000) #emitter current(mA)\n", "\n", - "#Result\n", "print 'Base current IB =',round(IB,2),'uA'\n", "print 'Collector current IC =',round(IC,2),'mA'\n", "print 'Collector-emitter voltage VCE = ',round(VCE,2),'V'\n", @@ -339,10 +303,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 6.8.py\n", - "#What is the collector-emitter voltage in figure 6-14? Use the second approximation.\n", "\n", - "#Variable declaration\n", "VBB=15 #Base voltage (V)\n", "RC=3.6 #Collector resistance(KOhm)\n", "VCC=15 #collector voltage(V)\n", @@ -350,12 +311,10 @@ "RB=470 #base resistance (KOhm)\n", "VBE=0.7 #base-emitter voltage drop(V) \n", "\n", - "#Calculation\n", "IB=((VBB-VBE)/float(RB))*1000 #base current(uA)\n", "IC=Bdc*IB/1000 #Collector current(mA)\n", "VCE=VCC-(IC*RC) #Collector-emitter voltage(V)\n", "\n", - "#Result\n", "print 'Base current IB =',round(IB,2),'uA'\n", "print 'Collector current IC =',round(IC,2),'mA'\n", "print 'Collector-emitter voltage VCE = ',round(VCE,2),'V'" @@ -387,10 +346,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 6.9.py\n", - "#suppose you measure a VBE 1V. What is the collector-emitter voltage in figure 6-14?\n", "\n", - "#Variable declaration\n", "VBB=15 #Base voltage (V)\n", "RC=3.6 #Collector resistance(KOhm)\n", "VCC=15 #collector voltage(V)\n", @@ -398,12 +354,10 @@ "RB=470 #base resistance (KOhm)\n", "VBE=1 #base-emitter voltage drop(V) \n", "\n", - "#Calculation\n", "IB=((VBB-VBE)/float(RB))*1000 #base current(uA)\n", "IC=Bdc*IB/1000 #Collector current(mA)\n", "VCE=VCC-(IC*RC) #Collector-emitter voltage(V)\n", "\n", - "#Result\n", "print 'Base current IB =',round(IB,2),'uA'\n", "print 'Collector current IC =',round(IC,2),'mA'\n", "print 'Collector-emitter voltage VCE = ',round(VCE,2),'V'" @@ -435,10 +389,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 6.10.py\n", - "#What is the collector-emitter voltage in preceding examples if base supply voltage is 5V?\n", "\n", - "#Variable declaration\n", "VBB=5 #Base voltage (V)\n", "RC=3.6 #Collector resistance(KOhm)\n", "VCC=15 #collector voltage(V)\n", @@ -448,7 +399,6 @@ "VBE2=0.7 #base-emitter voltage drop2(V)\n", "VBE3=1 #base-emitter voltage drop3(V)\n", "\n", - "#Calculation\n", "IB1=((VBB-VBE1)/float(RB))*1000 #base current1(uA)\n", "IC1=Bdc*IB1/1000 #Collector current1(mA)\n", "VCE1=VCC-(IC1*RC) #Collector-emitter voltage1(V)\n", @@ -461,7 +411,6 @@ "IC3=Bdc*IB3/1000 #Collector current3(mA)\n", "VCE3=VCC-(IC3*RC) #Collector-emitter voltage3(V)\n", "\n", - "#Result\n", "print 'Base current IB1 =',round(IB1,2),'uA'\n", "print 'Collector current IC1 =',round(IC1,2),'mA'\n", "print 'Collector-emitter voltage VCE1 = ',round(VCE1,2),'V'\n", @@ -507,19 +456,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 6.11.py\n", - "#A 2N3904 has VCE = 10V and Ic = 20mA. find power dissipation. \n", - "#How safe is this level of power dissipation if the ambient temperature is 25 deg C?\n", "\n", - "#Variable declaration\n", "VCE=10 #Collector-emitter voltage(V)\n", "IC=20 #Collector current(mA)\n", "T=25 #Ambient temperature(deg C)\n", " \n", - "#Calculation\n", "PD = VCE*IC #Power dissipation(mW)\n", "\n", - "#Result\n", "print 'Power dissipation PD = ',PD,'mW'\n", "print 'for 25 deg C, power rating is 625 mW So, transistor is well within power rating.'" ], @@ -549,21 +492,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 6.12.py\n", - "#How safe is the level of power dissipation if the ambient temeprature is 100 deg C in example 6-11?\n", "\n", - "#Variable declaration\n", "T1=100 #Ambient temperature(deg C)\n", "T2=25 #Reference temperature(deg C)\n", "mf=5 #Multiply factor(mW/deg C) \n", "Pr=625 #power rating(mW)\n", "\n", - "#Calculation\n", "Td=T1-T2 #Temperature difference(deg C)\n", "Pd=mf*Td #Difference in power(mW)\n", "PDmax=Pr-Pd #Maximum power dissipation(mW)\n", "\n", - "#Result\n", "print 'Maximum Power dissipation PDmax = ',PDmax,'mW'\n", "print 'for 25 deg C, power rating is 625 mW So, transistor is yet within power rating.'" ], diff --git a/Electronic_Principles_/Chapter_7_New.ipynb b/Electronic_Principles_/Chapter_7_New.ipynb index 5f237c0c..bf956ac7 100644 --- a/Electronic_Principles_/Chapter_7_New.ipynb +++ b/Electronic_Principles_/Chapter_7_New.ipynb @@ -27,18 +27,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 7.1.py\n", - "#Find saturation current and the cutoff voltage in Figure 7-4a.\n", "\n", - "#Variable declaration\n", "VCC=30 #collector voltage(V)\n", "RC=3 #Collector resistance (KOhm)\n", "\n", - "#Calculation\n", "ICsat=VCC/RC #Saturation current(mA)\n", "VCEc=VCC #VCE cutoff voltage(V)\n", "\n", - "#Result\n", "print 'Saturation current IC(saturation) = ',ICsat,'mA'\n", "print 'Collector emitter cutoff VCE(cutoff) = ',VCEc,'V'" ], @@ -68,18 +63,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 7.2.py\n", - "#What are the saturation current and the cutoff voltage in Figure 7-4b? \n", "\n", - "#Variable declaration\n", "VCC=9 #collector voltage(V)\n", "RC=3 #Collector resistance(KOhm)\n", "\n", - "#Calculation\n", "ICsat=VCC/RC #Saturation current(mA)\n", "VCEc=VCC #VCE cutoff voltage(V)\n", "\n", - "#Result\n", "print 'Saturation current IC(saturation) = ',ICsat,'mA'\n", "print 'Collector emitter cutoff VCE(cutoff) = ',VCEc,'V'" ], @@ -109,18 +99,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 7.3.py\n", - "#What are the saturation current and the cutoff voltage in Figure 7-5a? \n", "\n", - "#Variable declaration\n", "VCC=15 #collector voltage(V)\n", "RC=1 #Collector resistance(KOhm)\n", "\n", - "#Calculation\n", "ICsat=VCC/RC #Saturation current(mA)\n", "VCEc=VCC #VCE cutoff voltage(V)\n", "\n", - "#Result\n", "print 'Saturation current IC(saturation) = ',ICsat,'mA'\n", "print 'Collector emitter cutoff VCE(cutoff) = ',VCEc,'V'" ], @@ -150,18 +135,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 7.4.py\n", - "#What are the saturation current and the cutoff voltage in Figure 7-5b? \n", "\n", - "#Variable declaration\n", "VCC=15 #collector voltage(V)\n", "RC=3 #Collector resistance(KOhm)\n", "\n", - "#Calculation\n", "ICsat=VCC/RC #Saturation current(mA)\n", "VCEc=VCC #VCE cutoff voltage(V)\n", "\n", - "#Result\n", "print 'Saturation current IC(saturation) = ',ICsat,'mA'\n", "print 'Collector emitter cutoff VCE(cutoff) = ',VCEc,'V'" ], @@ -191,27 +171,21 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 7.5.py\n", - "#Base resistance is increased to 1MOhm. What happens to the collector-emitter voltage if Bdc is 100?\n", "\n", - "#Variable declaration\n", "VCC=15.0 #collector voltage(V)\n", "RC=3 #collector resistance (KOhm)\n", "VBB=15.0 #base voltage(V)\n", "RB=1 #base resistance (MOhm)\n", "Bdc=100 #current gain\n", "\n", - "#Calculation\n", "IB1=(VBB/RB) #base current(uA)\n", "IC1=Bdc*IB1/1000 #Collector current(mA)\n", "VCE1=VCC-(IC1*RC) #Collector-emitter voltage(V)\n", "\n", - "#second approx. calculation\n", "IB2=((VBB-0.7)/RB) #base current(uA)\n", "IC2=Bdc*IB2/1000 #Collector current(mA)\n", "VCE2=VCC-(IC2*RC) #Collector-emitter voltage(V)\n", "\n", - "#Result\n", "print 'Collector emitter voltage VCE1 = ',VCE1,'V'\n", "print 'For second approx., collector emitter voltage VCE2 = ',VCE2,'V'" ], @@ -241,23 +215,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 7.6.py\n", - "#Base resistance of figure 7-7a is increased to 1MOhm. \n", - "#Is the saturation still saturated?\n", "\n", - "#Variable declaration\n", "VCC=20.0 #collector voltage(V)\n", "RC=10 #collector resistance (KOhm)\n", "VBB=10.0 #base voltage(V)\n", "RB=1 #base resistance (MOhm)\n", "Bdc=50 #current gain\n", "\n", - "#Calculation\n", "IB=(VBB/RB) #base current(uA)\n", "IC=Bdc*IB/1000 #Collector current(mA)\n", "VCE=VCC-(IC*RC) #Collector-emitter voltage(V)\n", "\n", - "#Result\n", "print 'Collector emitter voltage VCE = ',VCE,'V'\n", "print 'So, transistor is in active region.'" ], @@ -287,17 +255,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 7.7.py\n", - "#Collector resistance of figure 7-7a is decreased to 5KOhm. Does the transistor remain in the saturation region?\n", "\n", - "#Variable declaration\n", "VCC=20.0 #collector voltage(V)\n", "RC=5 #collector resistance (KOhm)\n", "VBB=10.0 #base voltage(V)\n", "RB=100 #base resistance(KOhm)\n", "Bdco=50 #old current gain\n", "\n", - "#Calculation\n", "ICsat=VCC/RC #Saturation current(mA)\n", "IB=VBB/RB #base current(mA)\n", "IC=Bdc*IB/1000 #Collector current(mA)\n", @@ -305,7 +269,6 @@ "Bdcn=ICsat/IB #New current gain\n", " \n", "\n", - "#Result\n", "print 'ICsat = ',ICsat,'mA'\n", "print 'Bdc = ',int(Bdcn)\n", "print 'Current can not be more than ICsat So, current gain will decrease.'\n", @@ -339,11 +302,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 7.8.py\n", - "#VCC is decreased to 5V. What are the two values of the output voltage?\n", - "#If VCE(sat) is 0.15 V and ICEO is 50 nA, What are two values of the output voltage?\n", "\n", - "#Variable declaration\n", "VCC=5.0 #collector voltage(V)\n", "ICEO=50 #Collector leakage current(nA)\n", "RC=1 #collector resistance (KOhm)\n", @@ -351,10 +310,8 @@ "RB=10 #base resistance(KOhm)\n", "VCEs=0.15 #VCE saturation(V)\n", "\n", - "#Calculation\n", "VCE=VCC-((ICEO*RC)*10**-6) #Collector-emitter voltage(V)\n", "\n", - "#Result\n", "print 'Two values of output voltage are 0 and 5 V'\n", "print 'first voltage is voltage across saturated transistor = ',VCEs,'V' \n", "print 'Second voltage is: VCE = ',round(VCE,2),'V'" @@ -386,10 +343,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 7.9.py\n", - "#What is the VC & VCE in figure 7-11?\n", "\n", - "#Variable declaration\n", "VCC=15 #collector voltage(V)\n", "VBB=5 #Base voltage(V)\n", "RC=2 #collector resistance (KOhm)\n", @@ -398,7 +352,6 @@ "RE=1 #emitter resistance(KOhm)\n", "\n", "\n", - "#Calculation\n", "VE=VBB-VBE #Emitter voltage(V)\n", "IE=(VE/RE) #emitter current(mA)\n", "IC=IE #Collector current(mA)\n", @@ -406,7 +359,6 @@ "VCE=VC-VE #Collector-emitter voltage(V)\n", " \n", "\n", - "#Result\n", "print 'Emitter current IE = ',IE,'mA'\n", "print 'Emitter voltage VE = ',VE,'V'\n", "print 'Collector emitter voltage VCE = ',VCE,'V'" @@ -438,22 +390,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 7.10.py\n", - "#We want 25 mA of LED current when the switch is closed in figure 7-12b. How can we do it?\n", "\n", - "#Variable declaration\n", "VCC=20 #collector voltage(V)\n", "VBB=15 #Base voltage(V)\n", "VBE=0.7 #base voltage(V)\n", "RE=1.5 #emitter resistance(KOhm)\n", "IE=25.0 #emitter current(mA)\n", "\n", - "#Calculation\n", "VE=IE*RE #emitter current(mA)\n", "RE=(VBB/IE)*1000 #emitter resistance(KOhm)\n", "RE2=((VBB-VBE)/IE)*1000 #emitter resistance(KOhm)\n", " \n", - "#Result\n", "print 'Emitter voltage VE = ',VE,'V'\n", "print 'Emitter resistance RE = ',RE,'Ohm'\n", "print 'Emitter resistance RE2 = ',RE2,'Ohm'" diff --git a/Electronic_Principles_/Chapter_8_New.ipynb b/Electronic_Principles_/Chapter_8_New.ipynb index e3c2894e..5db68b59 100644 --- a/Electronic_Principles_/Chapter_8_New.ipynb +++ b/Electronic_Principles_/Chapter_8_New.ipynb @@ -27,10 +27,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 8.1.py\n", - "#What is the collector-emitter voltage in Figure 8-2? \n", "\n", - "#Variable declaration\n", "VCC=10 #collector voltage(V)\n", "RC=3.6 #Collector resistance (KOhm)\n", "RE=1 #Emitter resistance (KOhm)\n", @@ -38,7 +35,6 @@ "R2=2.2 #Base resistance2 (KOhm)\n", "VBE=0.7 #Base-emitter voltage drop(V)\n", "\n", - "#Calculation\n", "VBB=(R2/(R1+R2))*VCC #Base voltage(V)\n", "VE=VBB-VBE #Emitter voltage(V)\n", "IE=VE/RE #Emitter current(mA)\n", @@ -46,7 +42,6 @@ "VC=VCC-(IC*RC) #collector to ground voltage(V)\n", "VCE=VC-VE #Collector-emitter voltage(V)\n", "\n", - "#Result\n", "print 'Collector current IC = ',round(IC,2),'mA'\n", "print 'Collector-emitter voltage VCE = ',round(VCE,2),'V'" ], @@ -76,10 +71,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 8.3.py\n", - "#Is the voltage divider of figure 8-5 stiff? Calculate emitter current.\n", "\n", - "#Variable declaration\n", "VCC=10 #collector voltage(V)\n", "RC=3.6 #Collector resistance (KOhm)\n", "RE=1 #Emitter resistance (KOhm)\n", @@ -88,7 +80,6 @@ "VBE=0.7 #Base-emitter voltage drop(V)\n", "Bdc=200 #current gain\n", "\n", - "#Calculation\n", "R=(R1*R2)/(R1+R2) #Thevenin resistance(KOhm)\n", "Ri=Bdc*RE #Base input resistance(KOhm)\n", "R100=0.01*Ri #100th of Ri(KOhm)\n", @@ -96,7 +87,6 @@ "VE=VBB-VBE #Emitter voltage(V)\n", "IE=VE/(RE+(R/Ri)) #Emitter current(mA)\n", "\n", - "#Result\n", "print 'As per stiff voltage divider rule, R1||R2 < 0.01 Bdc*RE, So, Voltage divider is stiff.'\n", "print 'Emitter current IE = ',round(IE,2),'mA'" ], @@ -126,17 +116,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 8.4.py\n", - "#For the circuit shown in figure 8-7, design resistor values.\n", - "#VCC=10 V, VCE @ mid point, IC=10mA, 2N3904's Bdc=100-300.\n", "\n", - "#Variable declaration\n", "VCC=10 #collector voltage(V)\n", "IC=10 #Collector current(mA)\n", "VBE=0.7 #Base-emitter voltage drop(V)\n", "Bdc=100 #current gain\n", "\n", - "#Calculation\n", "IE=IC #Emitter current(mA)\n", "VE=0.1*VCC #Emitter voltage(V)\n", "RE=(VE/IE)*1000 #Emitter resistance (Ohm)\n", @@ -146,7 +131,6 @@ "V1=VCC-V2 #voltage across R2(V)\n", "R1=(V1/V2)*R2 #Base input resistance1(Ohm)\n", "\n", - "#Result\n", "print 'Emitter resistance RE = ',RE,'Ohm'\n", "print 'Collector resistance RC = ',RC,'Ohm'\n", "print 'Base resistance R1 = ',round(R1,2),'Ohm'\n", @@ -180,10 +164,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 8.5.py\n", - "#What is the collector voltage in Figure 8-10 if emitter resistor is increased to 1.8 KOhm? \n", "\n", - "#Variable declaration\n", "VCC=10 #collector voltage(V)\n", "RC=3.6 #Collector resistance (KOhm)\n", "RE=1.8 #Emitter resistance (KOhm)\n", @@ -191,14 +172,12 @@ "VBE=0.7 #Base-emitter voltage drop(V)\n", "VEE=2 #emitter voltage(V)\n", "\n", - "#Calculation\n", "VBB=0 #Base voltage(V)\n", "VE=VEE-VBE #Emitter to ground voltage(V)\n", "IE=VE/RE #Emitter current(mA)\n", "IC=IE #Collector current(mA)\n", "VC=VCC-(IC*RC) #collector to ground voltage(V)\n", "\n", - "#Result\n", "print 'Emitter current IE = ',round(IE,2),'mA'\n", "print 'Collector voltage VC = ',VC,'V'" ], @@ -228,24 +207,19 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 8.6.py\n", - "#Figure 8-11 shows 3 stage circuit using TSEB. Find VC.\n", "\n", - "#Variable declaration\n", "VCC=15 #collector voltage(V)\n", "RC=10 #Collector resistance (KOhm)\n", "RE=20 #Emitter resistance (KOhm)\n", "VBE=0.7 #Base-emitter voltage drop(V)\n", "VEE=15 #emitter voltage(V)\n", "\n", - "#Calculation\n", "VBB=0 #Base voltage(V)\n", "VE=VEE-VBE #Emitter to ground voltage(V)\n", "IE=VE/RE #Emitter current(mA)\n", "IC=IE #Collector current(mA)\n", "VC=VCC-(IC*RC) #collector to ground voltage(V)\n", "\n", - "#Result\n", "print 'Emitter current IE = ',IE,'mA'\n", "print 'Collector voltage VC = ',VC,'V'" ], @@ -275,10 +249,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 8.7.py\n", - "#Calculate the three transistor voltages for the PNP circuit of figure 8-19b?\n", "\n", - "#Variable declaration\n", "VCC=-10 #collector supply voltage(V)\n", "VEE=-VCC #Emitter supply voltage(V)\n", "RC=3.6 #Collector resistance (KOhm)\n", @@ -287,14 +258,12 @@ "R2=2.2 #Base resistance2 (KOhm)\n", "VBE=0.7 #Base-emitter voltage drop(V)\n", "\n", - "#Calculation\n", "V2=(R2/(R1+R2))*VEE #Base voltage(V)\n", "IE=(V2-VBE)/RE #Emitter current(mA)\n", "VC=IE*RC #collector to ground voltage(V)\n", "VB=VEE-V2 #Base to ground voltage(V)\n", "VE=VEE-(V2-VBE) #Emitter to ground voltage(V)\n", "\n", - "#Result\n", "print 'Emitter current IE = ',round(IE,2),'mA'\n", "print 'Collector to ground voltage VC = ',round(VC,2),'V'\n", "print 'Base to ground voltage VB = ',round(VB,2),'V'\n", diff --git a/Electronic_Principles_/Chapter_9_New.ipynb b/Electronic_Principles_/Chapter_9_New.ipynb index f0e0aec7..3fb67bca 100644 --- a/Electronic_Principles_/Chapter_9_New.ipynb +++ b/Electronic_Principles_/Chapter_9_New.ipynb @@ -27,21 +27,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 9.1.py\n", - "#Using figure 9-1a, if R=2KOhm & the frequency range is from 20Hz to 20 KHz, \n", - "#find C nedded to act as a good coupling capacitor.\n", "\n", "import math\n", "\n", - "#Variable declaration\n", "f=20 #frequency(Hz)\n", "R=2 #Resistance(KOhm)\n", "\n", - "#Calculation\n", "XC=0.1*R #Capacitive reactance(Ohm)\n", "C=(1/(2*math.pi*f*XC))*1000 #Capacitance(uF)\n", "\n", - "#Result\n", "print 'Capacitance C = ',round(C,2),'uF'" ], "language": "python", @@ -69,23 +63,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 9.2.py\n", - "#In figure 9-7, the input frequency of V is 1KHz. \n", - "#What value of C nedded to effectively short point E to ground?\n", "import math\n", "\n", - "#Variable declaration\n", "f=1 #frequency(KHz)\n", "R1=600 #Resistance1(Ohm)\n", "R2=1000 #Resistance2(Ohm)\n", "\n", - "#Calculation\n", "\n", "RTH=R1*R2/(R1+R2) #Thevenin resistance(Ohm)\n", "XC=0.1*RTH #Capacitive reactance(Ohm)\n", "C=(1/(2*math.pi*f*XC))*1000 #Capacitance(uF)\n", "\n", - "#Result\n", "print 'Capacitance C = ',round(C,2),'uF'" ], "language": "python", @@ -113,20 +101,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 9.3.py\n", - "#Using figure 9-9, find the maximum small signal emitter current.\n", "\n", - "#Variable declaration\n", "VCC=10 #collector voltage(V)\n", "RE=1 #Emitter resistance(KOhm)\n", "VBE=0.7 #Base-emitter voltage drop(V)\n", "VEE=2 #Emitter supply voltage(V)\n", "\n", - "#Calculation\n", "IEQ=(VEE-VBE)/RE #Q point emitter current(mA)\n", "iepp=0.1*IEQ*1000 #small signal emitter current(uA) \n", "\n", - "#Result\n", "print 'Q point emitter current IEQ = ',IEQ,'mA'\n", "print 'Small signal emitter current iepp = ',iepp,'uApp'" ], @@ -156,10 +139,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 9.4.py\n", - "#What does re' equal in the base-biased amplifier of figure 9-15a? \n", "\n", - "#Variable declaration\n", "VCC=30 #Supply voltage(V)\n", "RC=5 #Collector resistance (KOhm)\n", "RL=100 #Emitter resistance (KOhm)\n", @@ -167,12 +147,10 @@ "VBE=0.7 #Base-emitter voltage drop(V)\n", "Bdc=100 #current gain\n", "\n", - "#Calculation\n", "IB=(VCC-VBE)/RB #Base current(mA)\n", "IE=Bdc*IB/1000 #Emitter current(mA)\n", "re=25/IE #AC resistance(Ohm)\n", "\n", - "#Result\n", "print 'Emitter current IE = ',IE,'mA'\n", "print 'AC resistance re\\' = ',round(re,2),'Ohm'" ], @@ -202,10 +180,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 9.5.py\n", - "#What does re' equal in figure 9-15b? \n", "\n", - "#Variable declaration\n", "VCC=10 #collector voltage(V)\n", "RC=3.6 #Collector resistance (KOhm)\n", "RE=1 #Emitter resistance (KOhm)\n", @@ -213,13 +188,11 @@ "R2=2.2 #Base resistance2 (KOhm)\n", "VBE=0.7 #Base-emitter voltage drop(V)\n", "\n", - "#Calculation\n", "VBB=(R2/(R1+R2))*VCC #Base voltage(V)\n", "VE=VBB-VBE #Emitter voltage(V)\n", "IE=VE/RE #Emitter current(mA)\n", "re=25/IE #AC resistance(Ohm)\n", "\n", - "#Result\n", "print 'Emitter current IE = ',round(IE,2),'mA'\n", "print 'AC resistance re\\' = ',round(re,2),'Ohm'" ], @@ -249,10 +222,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#Example 9.6.py\n", - "#What is the ac resistance of emitter diode for the TSEB amplifier of figure 9-15c? \n", "\n", - "#Variable declaration\n", "VCC=10 #collector voltage(V)\n", "RC=3.6 #Collector resistance (KOhm)\n", "RE=1 #Emitter resistance (KOhm)\n", @@ -260,12 +230,10 @@ "VBE=0.7 #Base-emitter voltage drop(V)\n", "VEE=2 #emitter voltage(V)\n", "\n", - "#Calculation\n", "VE=VEE-VBE #Emitter to ground voltage(V)\n", "IE=VE/RE #Emitter current(mA)\n", "re=25/IE #AC resistance(Ohm)\n", "\n", - "#Result\n", "print 'Emitter current IE = ',IE,'mA'\n", "print 'AC resistance re\\' = ',round(re,2),'Ohm'" ], -- cgit