{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 3 : Bi Polar Junction Transistor" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.1, Page No. 82" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# varitation in alpha and value of beta \n", "\n", "import math\n", "#Variable declaration\n", "Beta=50.0 #amlification factor\n", "dbb=1.0 #percentage variation in degree celsius\n", "daa=dbb/50.0 #variation in degree celsius\n", "temp=325.0 #in K\n", "t=25 #degree celsius\n", "\n", "#Calculations\n", "Beta1=dbb*t\n", "nBeta=Beta+(Beta1/100)*t\n", "\n", "#Result\n", "print(\"(b) variation in alpha for a silicon BJT is ,(%%/degree-Celsius) = %.2f\"%daa)\n", "print(\"(c) new value of Beta is , = %.2f\"%nBeta)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(b) variation in alpha for a silicon BJT is ,(%/degree-Celsius) = 0.02\n", "(c) new value of Beta is , = 56.25\n" ] } ], "prompt_number": 46 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.2, Page No.83" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# current amplification factor\n", "\n", "import math\n", "#Variable declaration\n", "del_Ic=1*10**-3 # in A\n", "del_Ib=50*10**-6 # in A\n", "\n", "#Calcualtions\n", "Beta=del_Ic/del_Ib;\n", "print(\"The current amplification factor,Beta = %.f\"%Beta)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The current amplification factor,Beta = 20\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.3, Page No.83" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# base current\n", "\n", "import math\n", "#Variable declaration\n", "alfa=0.88 # Alfa\n", "Ie=1 # in mA\n", "\n", "#Calcualtions\n", "Ic=alfa*Ie \n", "I_B=Ie-Ic\n", "\n", "#Result\n", "print(\"Base current,(mA) = %.2f\"%I_B)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Base current,(mA) = 0.12\n" ] } ], "prompt_number": 12 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.4, Page No.83" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# short circuit current gain\n", "\n", "import math\n", "#Variable declaration\n", "del_Ic=0.95*10**-3 # in A\n", "del_Ie=1*10**-3 # in A\n", "\n", "#Calculations\n", "alfa=del_Ic/del_Ie;\n", "print(\"the short circuit current gain, = %.2f\"%alfa)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "the short circuit current gain, = 0.95\n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.5, Page No. 83" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# collector and base current\n", "\n", "import math\n", "#Variable declaration\n", "Ie=5*10**-3 # in A\n", "alfa=0.95 # Alfa \n", "I_co=10*10**-6 # in A\n", "Ic=((alfa*Ie)+I_co)*10**3\n", "Ib=(Ie-(Ic*10**-3))*10**6\n", "print(\"Collector current,(mA) = %.2f\"%Ic)\n", "print(\"Base current,(micro-A) = %.f\"%Ib)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Collector current,(mA) = 4.76\n", "Base current,(micro-A) = 240\n" ] } ], "prompt_number": 14 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.6, Page No. 84" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Ic Ib and Iceo\n", "\n", "import math\n", "#Variable declaration\n", "Ie=5.0 # in mA\n", "alfa=0.99 # Alfa\n", "I_co=0.005 # in mA\n", "\n", "#CAlculations\n", "Ic=((alfa*Ie)+I_co)\n", "Ib=(Ie-Ic)\n", "Beta=alfa/(1-alfa)\n", "I_CEO=I_co/(1-alfa)\n", "\n", "#Result\n", "print(\"Ic,(mA) = %.3f\"%Ic)\n", "print(\"Ib,(micro-A) = %.f\"%(Ib*10**3))\n", "print(\"Beta = %.f\"%Beta)\n", "print(\"I_CEO(micro-A) = %.f\"%(I_CEO*10**3))\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Ic,(mA) = 4.955\n", "Ib,(micro-A) = 45\n", "Beta = 99\n", "I_CEO(micro-A) = 500\n" ] } ], "prompt_number": 17 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.7, Page No. 84" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# change in collector current\n", "\n", "import math\n", "#Variable declaration\n", "alfa=0.9 # constant\n", "Del_Ib=4 # in mA\n", "\n", "#Caculations\n", "Beta=alfa/(1-alfa)\n", "Del_Ic=Beta*Del_Ib;\n", "\n", "#Result\n", "print(\"The change in the collector current,(mA) = %.f\"%Del_Ic)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The change in the collector current,(mA) = 36\n" ] } ], "prompt_number": 21 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.8, Page No. 84" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# emitter current\n", "\n", "import math\n", "#Variable declaration\n", "Beta=40.0 #beta\n", "Ib=25.0 # base current in micro-A\n", "\n", "#Calculation\n", "Ic=Beta*Ib;\n", "Ie=(Ib+Ic)*10**-3\n", "print(\"Ie,(mA) = %.3f\"%Ie)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Ie,(mA) = 1.025\n" ] } ], "prompt_number": 24 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.9, Page No. 85" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# beta \n", "\n", "import math\n", "#Variable declaration\n", "alfa=0.98 # constant\n", "\n", "#Calculation\n", "Beta=alfa/(1-alfa)\n", "\n", "#Result\n", "print(\"Beta = %.f\"%Beta)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Beta = 49\n" ] } ], "prompt_number": 27 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.10, Page No. 85" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# error\n", "\n", "import math\n", "#Variable declaration\n", "Beta=100.0 # constant\n", "Ib=20*10**-6 # in A\n", "I_co=500*10**-9 # in A\n", "\n", "#Calculation\n", "Ic1=((Beta*Ib)+(1+Beta)*I_co)*10**3\n", "Ic2=(Beta*Ib)*10**3\n", "Error=(Ic1-Ic2)*100.0/Ic1\n", "\n", "#Result\n", "print(\"The error,(%%) = %.2f\"%Error)\n", "#answer is wrong in the txtbook" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The error,(%) = 2.46\n" ] } ], "prompt_number": 30 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.11, Page No.85" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# change in base current\n", "\n", "import math\n", "#Variable declaration\n", "alfa=0.98 \n", "del_Ie=5.0 # in mA\n", "\n", "#Calculations\n", "del_Ic=alfa*del_Ie # in mA\n", "del_Ib=del_Ie-del_Ic;\n", "\n", "#Result\n", "print(\"change in base current,(mA) = %.1f\"%del_Ib)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "change in base current,(mA) = 0.1\n" ] } ], "prompt_number": 32 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.12, Page No. 86" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# collector current base current and alfa\n", "\n", "import math\n", "#Variable declaration\n", "Ie=8.4 # in mA\n", "cr=0.8/100 # carriers recombine in base in %\n", "\n", "#Calculations\n", "Ib=cr*Ie\n", "Ic=Ie-Ib\n", "alfa=Ic/Ie\n", "\n", "#Result\n", "print(\"(a). The base current,Ib(mA) = %.3f\"%Ib)\n", "print(\"(b). The collector current,Ic(mA) = %.2f\"%Ic)\n", "print(\"(c). the value of alfa = %.3f\"%alfa)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a). The base current,Ib(mA) = 0.067\n", "(b). The collector current,Ic(mA) = 8.33\n", "(c). the value of alfa = 0.992\n" ] } ], "prompt_number": 34 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.13, Page No. 86" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# ac current gain\n", "\n", "import math\n", "#Variable declaration\n", "Ie1=20.0 # in mA\n", "Ie2=15.0 # in mA\n", "Ib1=0.48 # in mA\n", "Ib2=0.32 # in mA\n", "\n", "#Calculation\n", "del_Ie=(Ie1-Ie2)*10**-3\n", "del_Ib=(Ib1-Ib2)*10**-3\n", "del_Ic=del_Ie-del_Ib\n", "alfa=del_Ic/del_Ie \n", "Beta=del_Ic/del_Ib\n", "\n", "#Result\n", "print(\"ac current gain in common base arrangement, = %.2f\"%alfa)\n", "print(\"ac current gain in common emitter arrangement, = %.f\"%Beta)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "ac current gain in common base arrangement, = 0.97\n", "ac current gain in common emitter arrangement, = 30\n" ] } ], "prompt_number": 37 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.14, Page No. 87" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Beta Iceo and collector current \n", "\n", "import math\n", "#Variable declaration\n", "alfa=0.992 # constant\n", "Ib=30*10**-6 # in A\n", "I_CBO=48*10**-9 # in A\n", "\n", "#Result\n", "Beta=alfa/(1-alfa)\n", "I_CEO=(1+Beta)*I_CBO*10**6\n", "Ic=((Beta*Ib)+(1+Beta)*I_CBO)*10**3\n", "\n", "#Result\n", "print(\"(a) Beta = %.f\"%Beta)\n", "print(\"(a) I_CEO (micro-A) = %.f\"%I_CEO)\n", "print(\"(b) Collector current,Ic(mA) = %.2f\"%(math.floor(Ic*100)/100))" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a) Beta = 124\n", "(a) I_CEO (micro-A) = 6\n", "(b) Collector current,Ic(mA) = 3.72\n" ] } ], "prompt_number": 47 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.15, Page No. 87" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# collector current alfa and beta\n", "\n", "import math\n", "#Variable declaration\n", "Ie=9.6 # emitter current in mA\n", "Ib=0.08 # base current in mA\n", "alfa=0.99\n", "\n", "Ic=Ie-Ib\n", "alfa=math.floor(Ic*100/Ie)/100\n", "Beta=alfa/(1-alfa)\n", "\n", "#Result\n", "print(\"(a). collector current,Ic(mA) = %.2f\"%Ic)\n", "print(\"(b). alfa = %.2f\"%alfa)\n", "print(\"(c). Beta = %.f\"%Beta)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a). collector current,Ic(mA) = 9.52\n", "(b). alfa = 0.99\n", "(c). Beta = 99\n" ] } ], "prompt_number": 51 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.16, Page No.87" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# collector current\n", "\n", "import math\n", "#Variable declaration\n", "Ib=68*10**-6 # in A\n", "Ie=30*10**-3 # in A\n", "Beta=440.0 # constant\n", "\n", "#Calculations\n", "alfa=Beta/(1+Beta)\n", "Ic=alfa*Ie*10**3\n", "\n", "#Result\n", "print(\"Collector current,Ic(mA) = %.2f\"%Ic)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Collector current,Ic(mA) = 29.93\n" ] } ], "prompt_number": 45 } ], "metadata": {} } ] }