diff options
author | hardythe1 | 2015-06-11 17:31:11 +0530 |
---|---|---|
committer | hardythe1 | 2015-06-11 17:31:11 +0530 |
commit | 79c59acc7af08ede23167b8455de4b716f77601f (patch) | |
tree | 2d6ff34b6f131d2671e4c6b798f210b3cb1d4ac7 /Electronic_Devices_and_Circuits_by_D._C._Kulshreshtha/chapter06.ipynb | |
parent | df60071cf1d1c18822d34f943ab8f412a8946b69 (diff) | |
download | Python-Textbook-Companions-79c59acc7af08ede23167b8455de4b716f77601f.tar.gz Python-Textbook-Companions-79c59acc7af08ede23167b8455de4b716f77601f.tar.bz2 Python-Textbook-Companions-79c59acc7af08ede23167b8455de4b716f77601f.zip |
add books
Diffstat (limited to 'Electronic_Devices_and_Circuits_by_D._C._Kulshreshtha/chapter06.ipynb')
-rwxr-xr-x | Electronic_Devices_and_Circuits_by_D._C._Kulshreshtha/chapter06.ipynb | 698 |
1 files changed, 698 insertions, 0 deletions
diff --git a/Electronic_Devices_and_Circuits_by_D._C._Kulshreshtha/chapter06.ipynb b/Electronic_Devices_and_Circuits_by_D._C._Kulshreshtha/chapter06.ipynb new file mode 100755 index 00000000..5865234b --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_D._C._Kulshreshtha/chapter06.ipynb @@ -0,0 +1,698 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:7be33daa1d7e9b1e217f1a71b195a0e8c1c9026233035f683a45d209e0003c84"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "chapter06:Transistor Biasing and Stabilization"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E1 - Pg 191"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Determine the Q point\n",
+ "#given\n",
+ "B=50.; #dc beta\n",
+ "Rc=2.2*10.**3.;#ohm #resistor connected to collector\n",
+ "Rb=270.*10.**3.;#ohm #resistor connected to base\n",
+ "Vcc=9.;#V #Voltage supply across the collector resistor\n",
+ "Vbe=0.7;#V #base to emitter voltage\n",
+ "Ib=(Vcc-Vbe)/Rb; #Base current\n",
+ "Ic=B*Ib; #Colletor current\n",
+ "Ics=Vcc/Rc; #Colletor saturation current\n",
+ "\n",
+ "#Actual Ic is the smaller of the above two values\n",
+ "Vce=Vcc-Ic*Rc;\n",
+ "print '%s %.1f %s %.1f %s' %(\"The Q point is =\",Vce,'V',Ic*1000,'mA');\n",
+ "\n",
+ "#Note--In book Vce = 5.7 V because of approaximation\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Q point is = 5.6 V 1.5 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E2 - Pg 192"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Determine the Q point\n",
+ "#given\n",
+ "B=150.; #dc beta\n",
+ "Rc=1.*10.**3.;#ohm #resistor connected to collector\n",
+ "Rb=100.*10.**3.;#ohm #resistor connected to base\n",
+ "Vcc=10.;#V #Voltage supply across the collector resistor\n",
+ "Vbe=0.7;#V #base to emitter voltage\n",
+ "Ib=(Vcc-Vbe)/Rb; #Base current\n",
+ "Ic=B*Ib; #Colletor current\n",
+ "Ics=Vcc/Rc; #Colletor saturation current\n",
+ "\n",
+ "#Actual Ic is the smaller of the above two values i.e. Ic(sat) and since the transistor is in saturation mode therefore Vce will become 0\n",
+ "\n",
+ "Vce=0;\n",
+ "print '%s %.f %s %.f %s' %(\"The Q point is =\",Vce,\"V\",Ics*1000,\"mA\");\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Q point is = 0 V 10 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E3 - Pg 192"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Determine Rb and percentage change in collector current due to temperature rise\n",
+ "#given\n",
+ "\n",
+ "#Calculating the base resistance\n",
+ "B=20.; #dc beta\n",
+ "Rc=1.*10.**3.;#ohm #resistor connected to collector\n",
+ "Ic=1.*10.**-3.;#A #collector current\n",
+ "Vcc=6.;#V #Voltage supply across the collector resistor\n",
+ "Vbe=0.3;#V #for germanium\n",
+ "Icbo=2.*10.**-6.;#A #collector to base leakage current\n",
+ "\n",
+ "Ib=(Ic-(1.+B)*Icbo)/B;\n",
+ "Rb=(Vcc-Vbe)/Ib;\n",
+ "\n",
+ "print '%s %.f %s' %(\"The value of resistor Ib is =\",120,'kohm');\n",
+ "\n",
+ "Rb=120.*10.**3.;#ohm approax\n",
+ "\n",
+ "#Now when temperature rise\n",
+ "Icbo=10.*10.**-6.;#A #collector to base leakage current\n",
+ "B=25.;#dc beta\n",
+ "Ic1=B*Ib+(B+1)*Icbo;# #changed collector current\n",
+ "perc=(Ic1-Ic)*100./Ic;#percentage increase\n",
+ "print '%s %.f %s' %(\"The percentage change in collector current is =\",perc,\"percent\");\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of resistor Ib is = 120 kohm\n",
+ "The percentage change in collector current is = 46 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E4 - Pg 193"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Determine the Q point at two different B\n",
+ "#given\n",
+ "\n",
+ "#At B=50\n",
+ "\n",
+ "B=50.; #dc beta\n",
+ "Rc=2.*10.**3.;#ohm #resistor connected to collector\n",
+ "Rb=300.*10.**3.;#ohm #resistor connected to base\n",
+ "Vcc=9.;#V #Voltage supply across the collector resistor\n",
+ "Ib=Vcc/Rb; #Base current\n",
+ "Ic=B*Ib; #Colletor current\n",
+ "Ics=Vcc/Rc; #Colletor saturation current\n",
+ "\n",
+ "#Actual Ic is the smaller of the above two values\n",
+ "\n",
+ "Vce=Vcc-Ic*Rc;\n",
+ "print '%s %.2f %s %.1f %s' %(\"The Q point (At B=50) =\",Vce,\"V\",Ic*1000,\"mA\");\n",
+ "\n",
+ "#At B=150\n",
+ "\n",
+ "B1=150.; #dc beta\n",
+ "Ic1=B*Ib; #Colletor current\n",
+ "Ics1=Vcc/Rc; #Colletor saturation current\n",
+ "\n",
+ "#Actual Ic is the smaller of the above two values i.e. Ic(sat) and since the transistor is in saturation mode therefore Vce will become 0\n",
+ "\n",
+ "Vce=0;\n",
+ "print '%s %.f %s %.1f %s' %(\"\\nThe Q point (At B=150) is =\",Vce,\"V\",Ics*1000,\"mA\");\n",
+ "\n",
+ "print '%s %.f' %(\"\\nThe factor at which collector current increases =\",Ics1/Ic);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Q point (At B=50) = 6.00 V 1.5 mA\n",
+ "\n",
+ "The Q point (At B=150) is = 0 V 4.5 mA\n",
+ "\n",
+ "The factor at which collector current increases = 3\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E5 - Pg 196"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#determine Q point in collector to base bias circuit\n",
+ "#given\n",
+ "B=100.; #dc beta\n",
+ "Rc=500.;#ohm #resistor connected to collector\n",
+ "Rb=500.*10.**3.;#ohm #resistor connected to base\n",
+ "Vcc=10.;#V #Voltage supply across the collector resistor\n",
+ "Ib=Vcc/(Rb+B*Rc); #Base current\n",
+ "Ic=B*Ib; #Colletor current\n",
+ "Ics=Vcc/Rc; #Colletor saturation current\n",
+ "\n",
+ "#Actual Ic is the smaller of the above two values\n",
+ "\n",
+ "Vce=Vcc-(Ic+Ib)*Rc;\n",
+ "print '%s %.1f %s %.1f %s' %(\"The Q point is =\",Vce,\"V\",Ic*1000,\"mA\");\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Q point is = 9.1 V 1.8 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E6 - Pg 196"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate the collector current and change in it if B is changed by three times of previous B\n",
+ "#given\n",
+ "B=50.; #dc beta\n",
+ "Rc=2.*10.**3.;#ohm #resistor connected to collector\n",
+ "Rb=300.*10.**3.;#ohm #resistor connected to base\n",
+ "Vcc=9.;#V #Voltage supply across the collector as it is PNP so taking positive\n",
+ "Ib=Vcc/(Rb+B*Rc); #Base current\n",
+ "Ic=B*Ib; #Colletor current\n",
+ "print '%s %.3f %s' %(\"Collector current (B=50)=\",Ic*1000,\"mA\\n\");\n",
+ "#Now B=150\n",
+ "B=3.*B; #three times of previous B\n",
+ "Ib1=Vcc/(Rb+B*Rc); #Base current\n",
+ "Ic1=B*Ib1; #Colletor current\n",
+ "print '%s %.2f %s' %(\"Collector current (B=150)=\",Ic1*1000,\"mA\\n\");\n",
+ "print '%s %.f' %(\"The factor at which collector current increases =\",Ic1/Ic);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector current (B=50)= 1.125 mA\n",
+ "\n",
+ "Collector current (B=150)= 2.25 mA\n",
+ "\n",
+ "The factor at which collector current increases = 2\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E7 - Pg 199"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate the value of all three current Ie and Ic and Ib\n",
+ "#given\n",
+ "B=90.; #dc beta\n",
+ "Rc=1.*10.**3.;#ohm #resistor connected to collector\n",
+ "Rb=500.*10.**3.;#ohm #resistor connected to base\n",
+ "Re=500.;#ohm #resistor connected to emitter\n",
+ "Vcc=9.;#V #Voltage supply across the collector resistor\n",
+ "Ib=Vcc/(Rb+B*Re); #Base current\n",
+ "Ic=B*Ib; #Colletor current\n",
+ "Ie=Ic+Ib; #Emitter current\n",
+ "print '%s %.1f %s %s %.3f %s %s %.3f %s' %(\"Base current =\",Ib*10**6,\"uA\\n\",\"\\nCollector current =\",Ic*10**3,\"mA\\n\",\"\\nEmitter current =\",Ie*10**3,\"mA\");\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base current = 16.5 uA\n",
+ " \n",
+ "Collector current = 1.486 mA\n",
+ " \n",
+ "Emitter current = 1.503 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E8 - Pg 199"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate max and min value of emitter current\n",
+ "#given\n",
+ "\n",
+ "#At B=50\n",
+ "\n",
+ "B=50.; #dc beta\n",
+ "Rc=75.;#ohm #resistor connected to collector\n",
+ "Re=100.;#ohm #resistor connected to emitter\n",
+ "Rb=10.*10.**3.;#ohm #resistor connected to base\n",
+ "Vcc=6.;#V #Voltage supply across the collector resistor\n",
+ "Vbe=0.3;#V #for germanium\n",
+ "Ib=(Vcc-Vbe)/(Rb+(1.+B)*Re); #Base current\n",
+ "Ie=(1.+B)*Ib;\n",
+ "Vce=Vcc-(Rc+Re)*Ie\n",
+ "print '%s %.2f %s' %(\"Minimum emitter current =\",Ie*10**3,\"mA\\n\");\n",
+ "print '%s %.2f %s' %(\"The collector to emitter volatge =\",Vce,\"V\\n\");\n",
+ "\n",
+ "#At B=300 \n",
+ "\n",
+ "B1=300.; #dc beta\n",
+ "Ib1=(Vcc-Vbe)/(Rb+(1.+B1)*Re);#Base current\n",
+ "Ie1=(1.+B1)*Ib1;\n",
+ "Vce1=Vcc-(Rc+Re)*Ie1\n",
+ "#Here Vce1= -1.4874 V but can never have negative voltage because Ie1 is wrong as it cant be more than saturation value therefore\n",
+ "Ie1=Vcc/(Rc+Re);\n",
+ "\n",
+ "#And Vce=0 V\n",
+ "\n",
+ "Vce1=0;#V\n",
+ "print '%s %.2f %s' %(\"Maximum emitter current =\",Ie1*10**3,\"mA\\n\");\n",
+ "print '%s %.f %s' %(\"The collector to emitter volatge(saturation) =\",Vce1,\"V\");\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum emitter current = 19.25 mA\n",
+ "\n",
+ "The collector to emitter volatge = 2.63 V\n",
+ "\n",
+ "Maximum emitter current = 34.29 mA\n",
+ "\n",
+ "The collector to emitter volatge(saturation) = 0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E9 - Pg 200"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Determine the value of base resistance\n",
+ "#given\n",
+ "\n",
+ "B=100.; #dc beta\n",
+ "Rc=200.;#ohm #resistor connected to collector\n",
+ "Re=500.;#ohm #resistor connected to emitter\n",
+ "Vcc=9.;#V #Voltage supply across the collector as it is PNP so taking positive\n",
+ "Vce=4.5;#V #Collector to emitter voltage\n",
+ "Ic=(Vcc-Vce)/(Rc+Re);\n",
+ "Ib=Ic/B;\n",
+ "Rb=(Vcc-B*Re*Ib)/Ib;\n",
+ "print '%s %.f %s' %(\"The value of base resistance is =\",Rb/1000,\"kohm\");\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of base resistance is = 90 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E10 - Pg 200"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Determine the collector current at two different B\n",
+ "#given\n",
+ "\n",
+ "#At B=50\n",
+ "\n",
+ "B=50.;#dc beta\n",
+ "Rc=2.;#ohm #resistor connected to collector\n",
+ "Re=1000.;#ohm #resistor connected to emitter\n",
+ "Rb=300.*10.**3.;#ohm #resistor connected to base\n",
+ "Vcc=9.;#V #Voltage supply across the collector resistor\n",
+ "Ib=Vcc/(Rb+B*Re); #Base current\n",
+ "Ic=B*Ib; #Colletor current\n",
+ "print '%s %.2f %s' %(\"The collector current at (B=50)=\",Ic*1000,\"mA\\n\");\n",
+ "\n",
+ "#At B=150\n",
+ "\n",
+ "B1=150.;#dc beta\n",
+ "Ib1=Vcc/(Rb+B1*Re); #Base current\n",
+ "Ic1=B1*Ib1; #Colletor current\n",
+ "print '%s %.1f %s' %(\"The collector current at (B=150)=\",Ic1*1000,\"mA\\n\");\n",
+ "print '%s %.1f' %(\"The factor at which collector current increases=\",Ic1/Ic);\n",
+ "\n",
+ "#IN BOOK Ic(AT B=50)= 1.25 mA and Ic1/Ic=2.4 DUE TO APPROAXIMATION\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The collector current at (B=50)= 1.29 mA\n",
+ "\n",
+ "The collector current at (B=150)= 3.0 mA\n",
+ "\n",
+ "The factor at which collector current increases= 2.3\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E11 - Pg 205"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate Q point in voltage divider\n",
+ "#given\n",
+ "B=100.; #dc beta\n",
+ "Rc=2.*10.**3.;#ohm #resistor connected to collector\n",
+ "R1=10.*10.**3.;#ohm #voltage divider resistor 1\n",
+ "R2=1.*10.**3.;#ohm #voltage divider resistor 2\n",
+ "Re=200.;#ohm #resistor connected to emitter\n",
+ "Vcc=10.;#V #Voltage supply across the collector resistor\n",
+ "Vbe=0.3;#V #base to emitter voltage\n",
+ "I=Vcc/(R1+R2); #current through voltage divider\n",
+ "Vb=I*R2; #voltage at base\n",
+ "Ve=Vb-Vbe;\n",
+ "Ie=Ve/Re;\n",
+ "Ic=Ie #approaximating Ib is nearly equal to 0\n",
+ "Vc=Vcc-Ic*Rc;\n",
+ "Vce=(Vc)-Ve; \n",
+ "print '%s %.1f %s %.f %s' %(\"The Q point is =\",Vce,\"V\",Ic*1000,\"mA\");\n",
+ "\n",
+ "Ibc=I/20.; #critical value of base current\n",
+ "Ib=Ic/B; #actual base current\n",
+ "\n",
+ "#Since Ib < Ibc, hence assumption is alright\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Q point is = 3.3 V 3 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E12 - Pg 207"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Solve the voltage divider accurately by applying thevenin's theorem\n",
+ "#given\n",
+ "B=100.; #dc beta\n",
+ "Rc=2.*10.**3.;#ohm #resistor connected to collector\n",
+ "R1=10.;#ohm #voltage divider resistor 1\n",
+ "R2=1.;#ohm #voltage divider resistor 2\n",
+ "Re=200.;#ohm #resistor connected to emitter\n",
+ "Vcc=10.;#V #Voltage supply across the collector resistor\n",
+ "Vbe=0.3;#V #base to emitter voltage\n",
+ "\n",
+ "Vth=Vcc*R2/(R1+R2);\n",
+ "Rth=R1*R2/(R1+R2);\n",
+ "\n",
+ "print '%s %.1f %s' %(\"\\nThevenin equivalent voltage Vth =\",Vth,\"V\");\n",
+ "print '%s %.1f %s' %(\"\\nThevenin equivalent resistance Rth =\",Rth,\"kohm\");\n",
+ "\n",
+ "Ib=(Vth-Vbe)/(Rth+(1.+B)*Re);\n",
+ "Ic=B*Ib;\n",
+ "Ie=Ic+Ib;\n",
+ "Vce=Vcc-Ic*Rc-Ie*Re; \n",
+ "print '%s %.4f %s' %(\"\\nThe accurate value of Ic =\",Ic*10**3,\"mA\");\n",
+ "print '%s %.5f %s' %(\"\\nThe accurate value of Vce =\",Vce,\"V\");\n",
+ "Icp=3.*10.**-3.; # Current calculated by voltage divider in previous example\n",
+ "Vcep=3.4; # Voltage calculated by voltage divider in previous example\n",
+ "Err_Ic=(Ic-Icp)*100./Ic;\n",
+ "Err_Vce=(Vce-Vcep)*100./Vce;\n",
+ "print '%s %.1f %s' %(\"\\nError in Ic =\",Err_Ic,\"percent\\n\");\n",
+ "print '%s %.1f %s' %(\"\\nError in Vce =\",Err_Vce,\"percent\");\n",
+ "\n",
+ "# The errors and The accurate values are different \n",
+ "# because of the approaximation in Vth and Rth in book\n",
+ "\n",
+ "# In Book Ic = 2.8436 mA and Vce = 3.73839 V\n",
+ "# Error in Ic = -5.5% \n",
+ "# Error in Vce = +9% "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Thevenin equivalent voltage Vth = 0.9 V\n",
+ "\n",
+ "Thevenin equivalent resistance Rth = 0.9 kohm\n",
+ "\n",
+ "The accurate value of Ic = 3.0152 mA\n",
+ "\n",
+ "The accurate value of Vce = 3.36060 V\n",
+ "\n",
+ "Error in Ic = 0.5 percent\n",
+ "\n",
+ "\n",
+ "Error in Vce = -1.2 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E13 - Pg 209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#determine the Q point for the emitter bias circuit\n",
+ "#given\n",
+ "B=100.; #dc beta\n",
+ "Rc=5.*10.**3.;#ohm #resistor connected to collector\n",
+ "Rb=10.*10.**3.;#ohm #resistor connected to base\n",
+ "Re=10.*10.**3.;#ohm #resistor connected to emitter \n",
+ "Vcc=12.;#V #Voltage supply across the collector resistor\n",
+ "Vee=15;#V #supply at emitter\n",
+ "Ie=Vee/Re;\n",
+ "Ic=Ie;\n",
+ "Vce=Vcc-Ic*Rc;\n",
+ "print '%s %.1f %s %.1f %s' %(\"The Q point is =\",Vce,\"V\",Ic*1000,\"mA\");\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Q point is = 4.5 V 1.5 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E14 - Pg 211"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate Vgs and Rs\n",
+ "#given\n",
+ "import math\n",
+ "Vp=2.;#V\n",
+ "Idss=1.75*10.**-3.;#A #drain current at Vgs=0\n",
+ "Vdd=24.;#V #drain to supply source\n",
+ "Id=1.*10.**-3.;#A #drain current\n",
+ "Vgs=(-Vp)*(1-math.sqrt(Id/Idss));\n",
+ "Rs=abs(Vgs)/Id;\n",
+ "print '%s %.3f %s' %(\"Vgs =\",Vgs,\"V\\n\");\n",
+ "print '%s %.f %s' %(\"Rs =\",Rs,\"ohm\");\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vgs = -0.488 V\n",
+ "\n",
+ "Rs = 488 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |