{ "metadata": { "name": "", "signature": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter3 - Bipolar Junction Transistors(BJTs)" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.1 - page 182" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "# Given data \n", "V_E= -0.7 # in V\n", "Bita=50 \n", "RC= 5 # in k\u03a9\n", "RE= 10 # in k\u03a9\n", "RE= RE*10**3 # in \u03a9\n", "RC= RC*10**3 # in \u03a9\n", "V_CC= 10 # in V\n", "V_BE= -10 # in volt\n", "I_E= (V_E-V_BE)/RE # in A\n", "print \"Emitter current = %0.2f mA\" %(I_E*10**3)\n", "# I_E= I_B+I_C and I_C= Bita*I_B, so\n", "I_B= I_E/(1+Bita) # in A\n", "print \"Base current = %0.1f \u00b5A\" %(I_B*10**6)\n", "I_C= I_E-I_B #in A\n", "print \"Collector current = %0.2f mA\" %(I_C*10**3)\n", "V_C= V_CC-I_C*RC # in V\n", "print \"The value of V_C = %0.2f Volt\" %(V_C)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Emitter current = 0.93 mA\n", "Base current = 18.2 \u00b5A\n", "Collector current = 0.91 mA\n", "The value of V_C = 5.44 Volt\n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.2 - page 183" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "# Given data \n", "V_E= 1.7 # in V\n", "V_B= 1 # in V\n", "RC= 5 # in k\u03a9\n", "RE= 5 # in k\u03a9\n", "RE= RE*10**3 # in \u03a9\n", "RC= RC*10**3 # in \u03a9\n", "RB= 100 #in k\u03a9\\\n", "RB= RB*10**3 # in \u03a9\n", "V_CC= 10 # in V\n", "V_BE= -10 # in volt\n", "I_E= (V_CC-V_E)/RE # in A\n", "I_B= V_B/RB # in V\n", "# Formula I_B= (1-alpha)*I_E\n", "alpha= 1-I_B/I_E \n", "print \"Value of alpha = %0.3f \" %(alpha)\n", "beta= alpha/(1-alpha) \n", "print \"Value of beta = %.01f \" %beta\n", "V_C= (I_E-I_B)*RC-V_CC # in volt\n", "print \"Collector voltage = %0.2f Volt\" %V_C\n", "# Answer in the textbook is not accurate." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Value of alpha = 0.994 \n", "Value of beta = 165.0 \n", "Collector voltage = -1.75 Volt\n" ] } ], "prompt_number": 12 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.3 - page 187" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division# Given data \n", "from numpy import log\n", "# Given data\n", "V_CC= 10 # in V\n", "V_CE= 3.2 # in V\n", "RC= 6.8 # in k\u03a9\n", "RC= RC*10**3 # in \u03a9\n", "I_S= 1*10**-15 # in A\n", "V_T= 25*10**-3 # in V\n", "I_C1= (V_CC-V_CE)/RC # in A\n", "print \"Part(a) : \"\n", "# Formula I_C= I_S*%e**(V_BE1/V_T)\n", "V_BE1= V_T*log(I_C1/I_S) # in volt\n", "print \"Collector current = %0.1f mA\" %(I_C1*10**3)\n", "print \"Value of V_BE = %0.1f Volt\" %(V_BE1)\n", "\n", "print \"Part(b) : \"\n", "v_in= 5*10**-3 # in V\n", "Av= -(V_CC-V_CE)/V_T # in V/V\n", "print \"Voltage gain = %0.1f V/V\" %(Av)\n", "v_o= abs(Av )*v_in # in V\n", "print \"Change in output voltage = %0.2f Volt\" %v_o\n", "\n", "print \"Part(c) : \"\n", "#for V_CE= 0.3 V\n", "V_CE= 0.3 # in V\n", "I_C2= (V_CC-V_CE)/RC # in A\n", "# I_C1= I_S*%e**(V_BE1/V_T) (i)\n", "# I_C2= I_S*%e**(V_BE2/V_T) (ii)\n", "# divide the equation (ii) by (i)\n", "delta_V_BE= V_T*log(I_C2/I_C1) # in volt ( where delta_V_BE = V_BE2-V_BE1 )\n", "print \"The positive increament in V_BE = %0.1f mV\" %(delta_V_BE*10**3)\n", "\n", "print \"Part(d) : \"\n", "v_o= 0.99*V_CC # in V\n", "I_C3= (V_CC-v_o)/RC # in A\n", "delta_V_BE= V_T*log(I_C3/I_C1) # in V\n", "print \"The negative increament in V_BE = %0.1f mV\" %(delta_V_BE*10**3 )" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Part(a) : \n", "Collector current = 1.0 mA\n", "Value of V_BE = 0.7 Volt\n", "Part(b) : \n", "Voltage gain = -272.0 V/V\n", "Change in output voltage = 1.36 Volt\n", "Part(c) : \n", "The positive increament in V_BE = 8.9 mV\n", "Part(d) : \n", "The negative increament in V_BE = -105.5 mV\n" ] } ], "prompt_number": 13 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.4 - page 197" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "# Given data \n", "V_CC= 10 # in V\n", "V_CE= 5 # in V\n", "V_BE= 0.7 # in V\n", "I_C= 5*10**-3 # in mA\n", "bita= 100 \n", "R_C= (V_CC-V_CE)/I_C # in \u03a9\n", "I_B= I_C/bita # in A\n", "R_B= (V_CC-V_BE)/I_B # in \u03a9\n", "print \"The value of R_C = %0.1f k\u03a9\" %(R_C*10**-3)\n", "print \"The value of I_B = %0.1f \u00b5A\" %(I_B*10**6)\n", "print \"The value of R_B = %.01f k\u03a9\" %(R_B*10**-3)\n", "\n", "# Note: The value of base current in the book is wrong" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of R_C = 1.0 k\u03a9\n", "The value of I_B = 50.0 \u00b5A\n", "The value of R_B = 186.0 k\u03a9\n" ] } ], "prompt_number": 14 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.5 - page 197" ] }, { "cell_type": "code", "collapsed": false, "input": [ "%matplotlib inline\n", "from matplotlib.pyplot import plot, text, xlabel, ylabel, show, axes, title, gca\n", "from __future__ import division\n", "from numpy import arange, nditer\n", "# Given data \n", "V_CC= 6 # in V\n", "bita= 100 \n", "R_C= 2 # in k\u03a9\n", "R_C= R_C*10**3 # in \u03a9\n", "R_B= 530 # in k\u03a9\n", "R_B= R_B*10**3 # in \u03a9\n", "# when I_C=0\n", "I_C=0 \n", "V_CE= V_CC-I_C*R_C # in volt\n", "V_CE= arange(0,7,0.1) # in Volt\n", "# defining function to get the collector current\n", "def current(V):\n", " it = nditer([V, None])\n", " for v_ce,i in it:\n", " i[...] = (V_CC-v_ce)/R_C*1000 \n", " return it.operands[1]\n", "I_C=current(V_CE) # in mA\n", "x=arange(-1,4,0.1)\n", "y=arange(-0.5,1.02,0.1)\n", "plot(V_CE,I_C) \n", "plot(4*(y/y),y,'--')\n", "plot(x,1*(x/x),'--')\n", "text(4,1.02,'Operating Point')\n", "title(\"DC load line\")\n", "xlabel(\"V_CE in volts\")\n", "ylabel(\"I_C in mA\")\n", "# Setting axes\n", "axes = gca()\n", "axes.set_xlim([0,6])\n", "axes.set_ylim([0,3])\n", "show()\n", "print \"DC load line shown in figure\"\n", "# When V_CE= 0\n", "I_C= V_CC/R_C #in A\n", "# Operating point for silicon transistor \n", "V_BE= 0.7 # in V\n", "I_B= (V_CC-V_BE)/R_B #in A\n", "I_CQ= bita*I_B # in A\n", "V_CEQ= V_CC-I_CQ*R_C # in volt\n", "print \"Operating point is \",V_CEQ,\" V and \",I_CQ*10**3,\" mA\"" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "display_data", "png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEaCAYAAAAcz1CnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X28lWWd7/HPV7eOKSiC5aSh5igeFHkQ1J2mbHXCp3wY\nNctzKtEj0iSTOdYpdE7gTDKjvo6S9coHGhWdxITsQVObEraFhRqCAlKGKT4l04iJH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MzFqcOwJreJLmS5pQ8twXJX27wnuGSbpf\n0jOSFkv6nqQPSOqQ9Ea6Rn3hdmyZ9/9E0s55fJ/0+LdJOrPou7wvr88yq+uZxWZVmkOyDELxzNBP\nkqycuQVJOwD3AZdExE/S58YD7yeZQfuLiDil0gdGxMkZ1F3xI3hvNu/FwB3Ahpw/01qUE4E1g+8D\nJ6ebbxTk5A/aAAACKUlEQVSWvN6jwgYx/x34VaETAIiIhyNiBVWutJnubjU4XQdrpaSb013Yfpp2\nNMVtd5H0fNHjnSS9kO7+NVrSIklPSrqnsHbRe031dyR7OCyQ9FC67PVtkpalu2t9sZp6zSpxR2AN\nL91h6jGSTVQgSQffq/CWg0h2S+vOUSWnhj5c7mOL7u8HfCsiRgB/Bs4sqe8NYGnREtUfBx6MiHeB\n24EvR8QokkXPpm3+1vgm8ArQERHHkezpsEdEHBwRI4FmWpvKasQdgTWLwukhSE4LzemhfaW//H8Z\nEWOKbs/1cKznIuKp9P5iYJ8ybb6X1kVa5/fSXaR2SXeqA5gNHN3DZz0L7CvpeknHA+t6aG/WI3cE\n1ix+DBwnaQywY7qhSndWkOzDm5X/Krr/LuXH3u4FTpC0K8m68PPLtOnxtFRE/BkYCXQCnyPZRtKs\nT9wRWFNIdz5bQHKq5M4emt8JHCGpcCoJSUdLOijn+h4HrgfujcQbwOuSPpo2+wzJD3ypN4Gd0zqH\nAG0RcQ/wv6mw2YhZtXzVkDWTOcA9wNmVGkXE2+lWjDMlzQTeAZ4EvgjsRjpGUPSWf0p/eDc7TDf3\nyz0u+B5wN9BR9Ny5wI3pfrLdrRl/M/CgpJeBS4Bb0z0QoML2g2bV8n4EZmYtzqeGzMxanE8NWdOS\ndDDJ5ZnF3o6Ij9SiHrN65VNDZmYtzqeGzMxanDsCM7MW547AzKzFuSMwM2tx7gjMzFrc/wcnnOmI\nlsbj/QAAAABJRU5ErkJggg==\n", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "DC load line shown in figure\n", "Operating point is 4.0 V and 1.0 mA\n" ] } ], "prompt_number": 15 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.6 - page 203" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "# Given data \n", "V_CC= 12 # in V\n", "V_BE= 0.7 # in V\n", "bita= 100 \n", "R_C= 10 # in k\u03a9\n", "R_C= R_C*10**3 # in \u03a9\n", "R_B= 100 # in k\u03a9\n", "R_B= R_B*10**3 # in \u03a9\n", "I_BQ= (V_CC-V_BE)/((1+bita)*R_C+R_B) # in A\n", "I_CQ= bita*I_BQ # in A\n", "V_CEQ= V_CC-(I_CQ+I_BQ)*R_C # in volt\n", "# For dc load line\n", "# When\n", "I_C=0 \n", "V_CE= V_CC-(I_C+I_BQ)*R_C # in volt\n", "# When\n", "V_CE= 0 \n", "I_C= (V_CC-I_BQ*R_C)/R_C #in A\n", "print \"Q- point values for circuit is\",round(V_CEQ,2),\"V and\",round(I_CQ*10**3),\"mA\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Q- point values for circuit is 1.72 V and 1.0 mA\n" ] } ], "prompt_number": 16 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.7 - page 204" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "# Given data \n", "V_CC= 15 # in V\n", "V_BE= 0.7 # in V\n", "V_CE= 5 # in V\n", "I_C= 5 # in mA\n", "I_C=I_C*10**-3 # in A\n", "bita= 100 \n", "I_B= I_C/bita # in A\n", "print \"Base current = %0.f \u00b5A\" %(I_B*10**6)\n", "#Apply KVL to collector circuit , V_CC= (I_C+I_B)*R_C+V_CE\n", "R_C= (V_CC-V_CE)/(I_C+I_B) # in \u03a9\n", "print \"The value of R_C = %0.2f k\u03a9\" %(R_C*10**-3)\n", "#Apply KVL to base or input circuit, V_CC= (I_C+I_B)*R_C+V_CE + I_B*R_B\n", "R_B= (V_CC-V_BE-(I_C+I_B)*R_C)/I_B # in ohm\n", "print \"The value of R_B = %0.f k\u03a9 \" %(R_B*10**-3)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Base current = 50 \u00b5A\n", "The value of R_C = 1.98 k\u03a9\n", "The value of R_B = 86 k\u03a9 \n" ] } ], "prompt_number": 17 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.8 - page 205" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "# Given data \n", "V_BE= 0.7 # in V\n", "V_CE= 3 # in V\n", "I_C= 1 # in mA\n", "I_C=I_C*10**-3 # in A\n", "bita= 100 \n", "I_B= I_C/bita # in A\n", "# V_CE= V_BE+V_CB and V_CB= I_B*R_B\n", "R_B= (V_CE-V_BE)/I_B # in \u03a9\n", "print \"The value of R_B = %0.f k\u03a9\" %(R_B*10**-3)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of R_B = 230 k\u03a9\n" ] } ], "prompt_number": 18 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.9 - page 208" ] }, { "cell_type": "code", "collapsed": false, "input": [ "%matplotlib inline\n", "# Exa 3.9\n", "from numpy import nditer, arange\n", "from matplotlib.pyplot import plot, text, xlabel, ylabel, show, axes, title, gca\n", "# Given data \n", "R1= 10;# in k\u03a9\n", "R1=R1*10**3;# in \u03a9\n", "R2= 5;# in k\u03a9\n", "R2=R2*10**3;# in \u03a9\n", "RC= 1;# in k\u03a9\n", "RC=RC*10**3;# in \u03a9\n", "RE= 2;# in k\u03a9\n", "RE=RE*10**3;# in \u03a9\n", "V_CC= 15;# in V\n", "V_BE= 0.7;# in V\n", "# When\n", "I_C=0;\n", "V_CE= V_CC-I_C*(RC+RE);# in V\n", "# When V_CE= 0\n", "I_C= V_CC/(RC+RE);# in A\n", "V_B= V_CC*R2/(R1+R2);# in V\n", "I_E= (V_B-V_BE)/RE;# in A\n", "I_C= I_E;# in A (approx)\n", "I_CQ= I_C;# in A\n", "V_CE= V_CC-I_C*(RC+RE);# in V\n", "V_CEQ= V_CE;# in V\n", "#############\n", "V_CE= arange(0,16,0.1);# in Volt\n", "def current(v):\n", " it = nditer([v, None])\n", " for x,y in it:\n", " y[...]= (V_CC-x)/(RC+RE)*1000\n", " return it.operands[1]\n", "I_C = current(V_CE)\n", "\n", "#I_C= (V_CC-V_CE)/(RC+RE)*1000;# in mA\n", "plot(V_CE,I_C);\n", "title(\"DC load line\")\n", "xlabel(\"V_CE in volts\")\n", "ylabel(\"I_C in mA\")\n", "text(8.55,2.15,'Q(8.55V,2.15mA)')\n", "x1=arange(0,8.55,0.01)\n", "y1=arange(0,2.15,0.01)\n", "a=arange(0,8.55,0.01)\n", "yd=2.15*(a/a)\n", "plot(a,yd,'b--')\n", "b=arange(-1,2.15,0.005)\n", "xd=8.55*(b/b)\n", "plot(xd,b,'b--')\n", "show()\n", "print \"DC load line shown in figure\"\n", "print 'Operating point is ',V_CEQ,\" V and \",I_CQ*10**3,\" mA\"" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "display_data", "png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEaCAYAAADzDTuZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XuYFPWV//H3QYKiKAoBQRRBBQUGBlCIGiKDkpUgovy8\nBVZEdLNR4y2oiWjyDF7iJeqKiJE1xusvIkYjRkHBC6MoIiCICILRyAqCYsBwEV25nP2jasaeoWem\nZ6a7q7r783qefuyprq46INOnv+db9T3m7oiISGFrFHUAIiISPSUDERFRMhARESUDERFByUBERFAy\nEBERlAxEMLNzzWx2ho6908wOqea1MjM7P3z+72Y2IxMxiKRCyUByipmtNLOtZrbJzL40szfM7Odm\nZlX262tm08N91pvZW2Z2bkRhV8fDB+7+Z3c/MeJ4pIApGUiucWCIu+8DtAduAX4N/Kl8BzM7BngZ\nmAUc6u4tgQu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wYd8VZuBfcI4WwKN3f2vwG+JZ9MfyWG6mkjywWSC\nrk5n1rSTu38TtgAdb2bjCZraLyZoYfl9wjmDhLfcEH74VjpMNc+T/VxuCkHbwZKEbaOASWErxY+A\nqmvlQ9Aj4QUz+xT4JfCgmZV/gYtdO1DJbepnICIiKhOJiIjKRJKHzKw7waWbib5x92OiiEckF6hM\nJCIiKhOJiIiSgYiIoGQgIiIoGYiICEoGIiIC/B9eQEZhSVTJsAAAAABJRU5ErkJggg==\n", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "DC load line shown in figure\n", "Operating point is 8.55 V and 2.15 mA\n" ] } ], "prompt_number": 19 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.10 page 220" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "# Given data \n", "V_CC= 10 # in V\n", "V_BB= 3 # in V\n", "V_BE= 0.7 # in V\n", "V_T= 25*10**-3 # in V\n", "bita=100 \n", "RC= 3 # in k\u03a9\n", "RC=RC*10**3 # in \u03a9\n", "RB= 100 # in k\u03a9\n", "RB=RB*10**3 # in \u03a9\n", "I_B= (V_BB-V_BE)/RB # in V\n", "I_C= bita*I_B # in A\n", "V_C= V_CC-I_C*RC # in V\n", "gm= I_C/V_T # in A/V\n", "r_pi= bita/gm # in \u03a9\n", "# v_be= r_pi/(RB+r_pi)*v_i\n", "v_be_by_v_i= r_pi/(RB+r_pi) \n", "# v_o= -gm*v_be*RC\n", "v_o_by_v_i= -gm*v_be_by_v_i*RC # in V/V\n", "Av= v_o_by_v_i # in V/V\n", "print \"Voltage gain = %0.2f V/V \" % (round(Av))\n", "# Answer in the book is not accurate." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Voltage gain = -3.00 V/V \n" ] } ], "prompt_number": 20 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.11 - page 253" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "# Given data \n", "V_B= 4 # in V\n", "V_BE= 0.7 # in V\n", "V_CC= 10 # in V\n", "V_E= V_B-V_BE # in V\n", "R_E= 3.3 # in k\u03a9\n", "R_E=R_E*10**3 # in \u03a9\n", "RC= 4.7 # in k\u03a9\n", "RC=RC*10**3 # in \u03a9\n", "I_E= V_E/R_E # in A\n", "bita=100 \n", "alpha= bita/(1+bita) \n", "I_C= alpha*I_E #in A\n", "print \"The value of I_C = %0.2f mA\" %(I_C*10**3)\n", "V_C= V_CC-I_C*RC # in V\n", "print \"The value of V_C = %0.1f Volts\" %(V_C)\n", "I_B= I_E/(1+bita) # in A\n", "print \"The value of I_B = %0.2f mA\" %(I_B*10**3)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of I_C = 0.99 mA\n", "The value of V_C = 5.3 Volts\n", "The value of I_B = 0.01 mA\n" ] } ], "prompt_number": 21 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.12 - page 254" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "# Given data \n", "V_B= 5 # in V\n", "V_BE= 0.7 # in V\n", "V_CC= 10 # in V\n", "bita=100 \n", "R_B= 100 # in k\u03a9\n", "R_C= 2 # in k\u03a9\n", "R_B=R_B*10**3 # in \u03a9\n", "R_C=R_C*10**3 # in \u03a9\n", "I_B= (V_B-V_BE)/R_B # in A\n", "I_C= bita*I_B #in A\n", "V_C= V_CC-I_C*R_C # in V\n", "I_E= I_C # in A (approx)\n", "print \"The value of I_B = %0.3f mA\" %(I_B*10**3)\n", "print \"The value of I_C = %0.1f mA \" %(I_C*10**3)\n", "print \"The value of V_C = %0.1f Volts\" %(V_C)\n", "print \"The value of I_E = %0.1f mA\" %(I_E*10**3)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of I_B = 0.043 mA\n", "The value of I_C = 4.3 mA \n", "The value of V_C = 1.4 Volts\n", "The value of I_E = 4.3 mA\n" ] } ], "prompt_number": 22 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.13 - page 255" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "from sympy import symbols, solve\n", "V_B = symbols('V_B')\n", "# Given data \n", "V_EB= 0.7 # in V\n", "V_E = 0.7 # in V\n", "bita=100 \n", "V_EC= 0.2 # in V\n", "V_E= V_EB+V_B # in V\n", "V_CC= 5 # in V\n", "R_E= 1 # in k\u03a9\n", "R_E=R_E*10**3 # in \u03a9\n", "R_C= 10 # in k\u03a9\n", "R_C=R_C*10**3 # in \u03a9\n", "R_B= 10 # in k\u03a9\n", "R_B= R_B*10**3 # in \u03a9\n", "V_E= V_B+V_EB # (i)\n", "V_C= V_E-V_EC # (ii)\n", "I_E= (V_CC-V_E)/(R_E)*1000 # mA (iii)\n", "I_B= V_B/R_B # (iv)\n", "I_C= (V_C+V_CC)/R_C # (v)\n", "# By using relationship, I_E= I_B+I_C\n", "expr = I_E*1000-(I_B*1000+I_C*1000)\n", "V_B = solve(expr,V_B)\n", "V_B= (9*V_CC-11*V_EB+V_EC)/12 # in V\n", "V_E= V_B+V_EB # in V\n", "V_C= V_B+V_EB-V_EC # in V\n", "I_E= (V_CC-V_E)/R_E# in amp\n", "I_C= (V_B+V_EB-V_EC+V_CC)/R_B # in amp\n", "I_B= V_B/R_B # in amp\n", "print \"The value of V_B = %0.2f Volts\" %V_B\n", "print \"The value of V_E = %0.2f Volts\" %V_E\n", "print \"The value of V_C = %0.2f Volts\" %V_C\n", "print \"The value of I_E = %0.2f mA\" %(I_E*10**3)\n", "print \"The value of I_C = %0.2f mA\" %(I_C*10**3)\n", "print \"The value of I_B = %0.2f mA\" %(I_B*10**3)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of V_B = 3.12 Volts\n", "The value of V_E = 3.83 Volts\n", "The value of V_C = 3.62 Volts\n", "The value of I_E = 1.17 mA\n", "The value of I_C = 0.86 mA\n", "The value of I_B = 0.31 mA\n" ] } ], "prompt_number": 23 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.14 - page 257" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data \n", "bita=100 \n", "hFE= 100 \n", "VCEsat= 0.2 # in V\n", "VBEsat= 0.8 # in V\n", "VBEactive= 0.7 # in V\n", "VBB= 5 # in V\n", "VCC= 10 # in V\n", "R_C= 3 # in k\u03a9\n", "R_C=R_C*10**3 # in \u03a9\n", "R_B= 50 # in k\u03a9\n", "R_B=R_B*10**3 # in \u03a9\n", "# Formula VCC= ICsat*R_C+VCEsat\n", "ICsat= (VCC-VCEsat)/R_C #A\n", "print \"The value of IC(sat) = %0.2f mA\" %(ICsat*10**3)\n", "IBmin= ICsat/bita # in A\n", "# Apply KVL to input circuit, VBB= IB*R_B+VBEsat\n", "IB= (VBB-VBEsat)/R_B # in A\n", "print \"Actual base current = %0.f \u00b5A\" %(IB*10**6)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of IC(sat) = 3.27 mA\n", "Actual base current = 84 \u00b5A\n" ] } ], "prompt_number": 24 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.16 - page 259" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data \n", "# beta= alpha/(1-alpha)\n", "# At alpha= 0.5\n", "alpha= 0.5 \n", "beta= alpha/(1-alpha) \n", "print \"At alpha=0.5, the value of beta = %0.f \" %beta\n", "# At alpha= 0.9\n", "alpha= 0.9 \n", "beta = alpha/(1-alpha) \n", "print \"At alpha=0.9, the value of beta is %0.f \" %beta\n", "# At alpha= 0.5\n", "alpha= 0.999 \n", "beta= alpha/(1-alpha) \n", "print \"At alpha=0.999, the value of beta is %0.f \" %beta" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "At alpha=0.5, the value of beta = 1 \n", "At alpha=0.9, the value of beta is 9 \n", "At alpha=0.999, the value of beta is 999 \n" ] } ], "prompt_number": 25 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.17 - page 259" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "# Given data \n", "# alpha= beta/(1-beta)\n", "# At beta= 1\n", "beta=1 \n", "alpha= beta/(1+beta) \n", "print \"At beta=1, the value of alpha is %0.2f \" %alpha\n", "# At beta= 2\n", "beta=2 \n", "alpha= beta/(1+beta) \n", "print \"At beta=2, the value of alpha is %0.2f \" %alpha\n", "# At beta= 100\n", "beta=100 \n", "alpha= beta/(1+beta) \n", "print \"At beta=100, the value of alpha is %0.2f \" %alpha\n", "# At beta= 200\n", "beta=200 \n", "alpha= beta/(1+beta) \n", "print \"At beta=200, the value of alpha is %0.3f \"%alpha" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "At beta=1, the value of alpha is 0.50 \n", "At beta=2, the value of alpha is 0.67 \n", "At beta=100, the value of alpha is 0.99 \n", "At beta=200, the value of alpha is 0.995 \n" ] } ], "prompt_number": 26 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.18 - page 260" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from numpy import exp, log\n", "# Given data \n", "VBE= 0.76 # in V\n", "VT= 0.025 # in V\n", "I_C= 10*10**-3 # in A\n", "# Formula I_C= I_S*exp(VBE/VT)\n", "I_S= I_C/(exp(VBE/VT)) # in A\n", "print \"The value of I_S = %0.3e A\" %I_S\n", "# Part(a) for VBE = 0.7 V\n", "VBE= 0.7 # in V\n", "I_C= I_S*exp(VBE/VT)\n", "print \"For VBE = 0.7 V , The value of I_C = %0.3f mA\" %(I_C*10**3)\n", "\n", "# Part (b) for I_C= 10 \u00b5A\n", "I_C= 10*10**-6 # in A\n", "# Formula I_C= I_S*exp(VBE/VT)\n", "VBE= VT*log(I_C/I_S) \n", "print \"For I_C = 10 \u00b5A, The value of VBE = %0.3f V\" %VBE" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of I_S = 6.273e-16 A\n", "For VBE = 0.7 V , The value of I_C = 0.907 mA\n", "For I_C = 10 \u00b5A, The value of VBE = 0.587 V\n" ] } ], "prompt_number": 27 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.19 - page 260" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "# Given data \n", "VBE= 0.7 # in V\n", "VT= 0.025 # in V\n", "I_B= 100 # in \u00b5A\n", "I_B=I_B*10**-6 # in A\n", "I_C= 10*10**-3 # in A\n", "# Formula I_C= I_S*exp(VBE/VT)\n", "I_S= I_C/(exp(VBE/VT)) # in A\n", "alpha= I_C/(I_C+I_B) \n", "beta= I_C/I_B \n", "IS_by_alpha= I_S/alpha # in A\n", "IS_by_beta= I_S/beta # in A\n", "print \"The value of alpha is %0.2f \" %alpha\n", "print \"The value of beta is %0.2f \" %beta \n", "print \"The value of Is/alpha = %0.2e A\" %IS_by_alpha\n", "print \"The value of Is/beta = %0.2e A\" %IS_by_beta" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of alpha is 0.99 \n", "The value of beta is 100.00 \n", "The value of Is/alpha = 6.98e-15 A\n", "The value of Is/beta = 6.91e-17 A\n" ] } ], "prompt_number": 28 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.20 - page 261" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data \n", "VBE= 0.7 # in V\n", "VCC= 10.7 # in V\n", "R_C= 10 #in k\u03a9\n", "R_C=R_C*10**3 # in \u03a9\n", "R_B= 10 #in k\u03a9\n", "R_B=R_B*10**3 # in \u03a9\n", "I1= (VCC-VBE)/R_C # in A\n", "print \"The value of I1 = %0.f mA\" %(I1*10**3)\n", "# Part (b)\n", "VC= -4 #in V\n", "VB= -10 # in V\n", "R_C= 5.6 #in k\u03a9\n", "R_C=R_C*10**3 # in \u03a9\n", "R_B= 2.4 #in k\u03a9\n", "R_B=R_B*10**3 # in \u03a9\n", "VCC=12 # V\n", "I_C= (VC-VB)/R_B # in A\n", "V2= VCC- (R_C*I_C) \n", "print \"The value of V2 = %0.f Volt\" %V2\n", "# Part (c)\n", "VCC= 0 \n", "VCE= -10 # in V\n", "R_C= 10 #in k\u03a9\n", "R_C=R_C*10**3 # in \u03a9\n", "I_C= (VCC-VCE)/R_C # in A\n", "V4= 1 # in V\n", "I3= I_C # in A (approx)\n", "print \"The value of V4 = %0.f Volt\" %V4\n", "print \"The value of I3 = %0.f mA\" %(I3*10**3)\n", "# Part (d)\n", "VBE= -10 # in V\n", "VCC= 10 # in V\n", "R_B= 5 #in k\u03a9\n", "R_B=R_B*10**3 # in \u03a9\n", "R_C= 15 #in k\u03a9\n", "R_C=R_C*10**3 # in \u03a9\n", "# I5= I_C and \n", "# I5= (V6-0.7-VBE)/R_B and I_C= (VCC-V6)/R_C\n", "V6= (VCC*R_B+R_C*(0.7+VBE))/(R_C+R_B) \n", "print \"The value of V6 = %0.3f Volt\" %(V6)\n", "I5= (V6-0.7-VBE)/R_B # in A\n", "print \"The value of I5 = %0.3f mA\" %(I5*10**3)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of I1 = 1 mA\n", "The value of V2 = -2 Volt\n", "The value of V4 = 1 Volt\n", "The value of I3 = 1 mA\n", "The value of V6 = -4.475 Volt\n", "The value of I5 = 0.965 mA\n" ] } ], "prompt_number": 29 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.21 -page 264" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data \n", "# Part (a)\n", "V_C= 2 # in V\n", "R_C= 1 # in k\u03a9\n", "R_C=R_C*10**3 # in \u03a9\n", "V_B= 4.3 # in V\n", "R_B= 200 # in k\u03a9\n", "R_B=R_B*10**3 # in \u03a9\n", "I_C= V_C/R_C # in A\n", "I_B= V_B/R_B # in A\n", "beta= I_C/I_B \n", "print \"Part (a)\"\n", "print \"Collector current = %0.f mA\" %(I_C*10**3)\n", "print \"Base current = %0.1f \u00b5A\" %(I_B*10**6)\n", "print \"The value of beta is %0.f \"%beta\n", "\n", "# Part (b)\n", "V_C= 2.3 # in V\n", "R_C= 230 # in k\u03a9\n", "R_C=R_C*10**3 # in \u03a9\n", "V_B= 4.3 # in V\n", "R_B= 20 # in k\u03a9\n", "R_B=R_B*10**3 # in \u03a9\n", "I= V_C/R_C # current through 230\u03a9 resistro i.e. I_C + I_B in A\n", "I_B= (V_B-V_C)/R_B # in A\n", "I_C= I-I_B # in A\n", "bita= abs(I_C/I_B) \n", "print \"Part (b)\"\n", "print \"Collector current = %0.2f mA\" %(I_C*10**3)\n", "print \"Base current = %0.2f mA\" %(I_B*10**3)\n", "print \"The value of beta is %0.2f \"%beta\n", "\n", "# Part (c)\n", "V_E= 10 # in V\n", "R_E= 1 # in k\u03a9\n", "R_E=R_E*10**3 # in \u03a9\n", "V_1= 7 # in V\n", "R_C= 1 # in k\u03a9\n", "R_C=R_C*10**3 # in \u03a9\n", "V_B= 6.3 # in V\n", "R_B= 100 # in k\u03a9\n", "R_B=R_B*10**3 # in \u03a9\n", "I_E= (V_E-V_1)/R_C #in A\n", "I_C=I_E # in A (approx)\n", "V_C= I_C*R_C # in V\n", "I_B= (V_B-V_C)/R_B # in A\n", "beta= I_E/I_B-1 \n", "print \"Part (c)\"\n", "print \"Emitter current = %0.2f mA\" %(I_E*10**3)\n", "print \"Base current = %0.2f \u00b5A\" %(I_B*10**6)\n", "print \"Collector voltage = %0.2f Volts\" %(V_C)\n", "print \"The value of beta is %0.2f \"%(beta)\n", "\n", "# Note : In the book the value of base current in the first part is wrong due to calculation error.\n", "#In the part (b) the values of collector current and beta are wrong due to calculation error in the first line of part (b)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Part (a)\n", "Collector current = 2 mA\n", "Base current = 21.5 \u00b5A\n", "The value of beta is 93 \n", "Part (b)\n", "Collector current = -0.09 mA\n", "Base current = 0.10 mA\n", "The value of beta is 93.02 \n", "Part (c)\n", "Emitter current = 3.00 mA\n", "Base current = 33.00 \u00b5A\n", "Collector voltage = 3.00 Volts\n", "The value of beta is 89.91 \n" ] } ], "prompt_number": 30 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.22 - page 266" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data \n", "# Part (a)\n", "beta= 30 \n", "R_C= 2.2 # in k\u03a9\n", "R_C=R_C*10**3 # in \u03a9\n", "R_B= 2.2 # in k\u03a9\n", "R_B=R_B*10**3 # in \u03a9\n", "VCC= 3 # in V\n", "VCE= -3 # in V\n", "VBE= 0.7 # in V\n", "V_B= 0 # in V\n", "V_E= V_B-VBE # in V\n", "I_E= (V_E-VCE)/R_B # in A\n", "I_C= I_E # in A\n", "V_C= VCC-I_E*R_C # in V\n", "I_B= I_C/beta # in A\n", "print \"Part (a)\"\n", "print \"The value of V_B = %0.2f V \" %V_B\n", "print \"The value of V_E = %0.2f V\" %V_E\n", "print \"The value of I_E = %0.2f mA\" %(I_E*10**3)\n", "print \"The value of V_C = %0.3f V\" %(V_C)\n", "print \"The value of I_B = %0.2f mA\" %(I_B*10**3)\n", "# Part (b)\n", "R_C= 560 # in \u03a9\n", "R_B= 1.1 # in k\u03a9\n", "R_B=R_B*10**3 # in \u03a9\n", "VCC= 9 # in V\n", "VCE= 3 # in V\n", "V_B= 3 # in V\n", "V_E= V_B+VBE # in V\n", "I_E= (VCC-V_E)/R_B # in A\n", "alpha= beta/(1+beta) \n", "I_C= I_E*alpha # in A\n", "V_C= I_C*R_C # in V\n", "I_B= I_C/beta # in A\n", "print \"Part (b)\"\n", "print \"The value of V_B = %0.2f V \" %V_B\n", "print \"The value of V_E = %0.2f V\" %V_E\n", "print \"The value of I_E = %0.2f mA\" %(I_C*10**3)\n", "print \"The value of V_C = %0.2f V\" %(V_C)\n", "print \"The value of I_B = %0.3f mA\" %(I_B*10**3)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Part (a)\n", "The value of V_B = 0.00 V \n", "The value of V_E = -0.70 V\n", "The value of I_E = 1.05 mA\n", "The value of V_C = 0.700 V\n", "The value of I_B = 0.03 mA\n", "Part (b)\n", "The value of V_B = 3.00 V \n", "The value of V_E = 3.70 V\n", "The value of I_E = 4.66 mA\n", "The value of V_C = 2.61 V\n", "The value of I_B = 0.155 mA\n" ] } ], "prompt_number": 31 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.23 - page 268" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from numpy import inf\n", "# Given data \n", "VBE= 0.7 # in V\n", "VCC= 9 # in V\n", "VCE= -9 # in V\n", "V_B= -1.5 # in V\n", "R_C= 10 # in k\u03a9\n", "R_C=R_C*10**3 # in \u03a9\n", "R_B= 10 # in k\u03a9\n", "R_B=R_B*10**3 # in \u03a9\n", "I_B= abs(V_B)/R_B # in A\n", "V_E= V_B-VBE # in V\n", "print \"The value of V_E = %0.2f Volt\" %V_E\n", "I_E= (V_E-VCE)/R_B # in A\n", "beta= I_E/I_B-1 \n", "alpha= beta/(1+beta) \n", "print \"The value of alpha = %0.2f Volt\" %alpha\n", "print \"The value of beta = %0.2f Volt\" %beta\n", "V_C= VCC-I_E*alpha*R_C # in V\n", "print \"The value of V_C = %0.2f Volt\" %V_C\n", "beta = inf\n", "alpha= beta/(1+beta)\n", "I_B= 0 \n", "V_B=0 \n", "V_C= VCC-I_E*R_C # in volt\n", "print \"The value of V_B = %0.2f V \" %V_B\n", "print \"The value of V_E = %0.2f V\" %V_E\n", "print \"The value of V_C = %0.2f V\" %(V_C)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of V_E = -2.20 Volt\n", "The value of alpha = 0.78 Volt\n", "The value of beta = 3.53 Volt\n", "The value of V_C = 3.70 Volt\n", "The value of V_B = 0.00 V \n", "The value of V_E = -2.20 V\n", "The value of V_C = 2.20 V\n" ] } ], "prompt_number": 32 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.24 - page 269" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data \n", "VBE_1= 0.7 # in V\n", "VBE_2= 0.5 # in V\n", "V_T= 0.025 # in V\n", "I_C1= 10 # in mV\n", "I_C1= I_C1*10**-3 # in A\n", "# I_C1= I_S*%e**(VBE_1/V_T) (i)\n", "# I_C2= I_S*%e**(VBE_2/V_T) (ii)\n", "# Devide equation (ii) by (i)\n", "I_C2= I_C1*exp((VBE_2-VBE_1)/V_T) # in A\n", "print \"The value of I_C2 = %0.2f \u00b5A\" %(I_C2*10**6)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of I_C2 = 3.35 \u00b5A\n" ] } ], "prompt_number": 33 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.25 - page 270" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data \n", "R1= 10 # in k\u03a9\n", "R1=R1*10**3 # in \u03a9\n", "R2= 10 # in k\u03a9\n", "R2=R2*10**3 # in \u03a9\n", "I_C=.5 # mA\n", "V_T= 0.025 #in V\n", "I_C= I_C*10**-3 # in A\n", "V= 10 # in V\n", "Vth= V*R1/(R1+R2) # in V\n", "Rth= R1*R2/(R1+R2) #in \u03a9\n", "vo= I_C*Rth # in V\n", "vi=V_T # in V\n", "vo_by_vi= vo/vi #in V/V\n", "print \"The value of vo/vi = %0.f V/V \" %vo_by_vi" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of vo/vi = 100 V/V \n" ] } ], "prompt_number": 34 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.27 - page 272" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data \n", "V_B= 2 # in V\n", "V_CC=5 # in V\n", "V_BE= 0.7 # in V\n", "R_E= 1*10**3 # in \u03a9\n", "R_C= 1*10**3 # in \u03a9\n", "V_E= V_B-V_BE # in V\n", "I_E= V_E/R_E # in A\n", "I_C= I_E # in A\n", "V_C= V_CC-I_C*R_C #in V\n", "print \"At V_B= +2 V\"\n", "print \"The value of V_E = %0.2f Volts\" %V_E\n", "print \"The value of V_C = %0.2f Volts\" %V_C\n", "\n", "# Part (b)\n", "V_B= 0 #in V\n", "V_E= 0 # in V\n", "I_E= 0 # in A\n", "V_C= 5 # in V\n", "print \"At V_B= 0 V\"\n", "print \"The value of V_E = %0.2f Volts\" %V_E\n", "print \"The value of V_C = %0.2f Volts\" %V_C" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "At V_B= +2 V\n", "The value of V_E = 1.30 Volts\n", "The value of V_C = 3.70 Volts\n", "At V_B= 0 V\n", "The value of V_E = 0.00 Volts\n", "The value of V_C = 5.00 Volts\n" ] } ], "prompt_number": 35 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.28 - page 273" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data \n", "V_B= 0 # in V\n", "R_E=1*10**3 #in \u03a9\n", "R_C=1*10**3 #in \u03a9\n", "V_CC=5 # in V\n", "V_BE= 0.7 # in V\n", "V_E= V_B-V_BE # in V\n", "I_E= (1+V_E)/R_E # in A\n", "I_C= I_E # (approx) in A\n", "V_C= V_CC-I_C*R_C #in V\n", "print \"Part (a)\"\n", "print \"The value of V_E = %0.2f Volts\" %V_E\n", "print \"The value of V_C = %0.2f Volts\" %V_C\n", "# For saturation \n", "V_CE=0.2 # V\n", "V_CB= -0.5 # in V\n", "# I_C= 5-V_C/R_C and V_C= V_E-VCE, So\n", "# I_C= (5.2-V_E)/R_C\n", "# I_E= (V_E+1)/R_E and at the edge of saturation I_C=I_E,\n", "V_E= 4.2/2 #/ in V\n", "V_B= V_E+0.7 # in V\n", "V_C= V_E+0.2 # in V\n", "print \"Part (b) \"\n", "print \"The value of V_E = %0.2f Volts\" %V_E\n", "print \"The value of V_B = %0.2f Volts\" %V_B\n", "print \"The value of V_C = %0.2f Volts\" %V_C\n", "\n", "# Note: In the book , there is a miss print in the last line of this question \n", "#because V_E+0.2= 2.1+0.2 = 2.3 (not 2.8) , so answer in the book is wrong " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Part (a)\n", "The value of V_E = -0.70 Volts\n", "The value of V_C = 4.70 Volts\n", "Part (b) \n", "The value of V_E = 2.10 Volts\n", "The value of V_B = 2.80 Volts\n", "The value of V_C = 2.30 Volts\n" ] } ], "prompt_number": 36 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.29 - page 275" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data \n", "V_CC=5 # in V\n", "V_E= 1 # in V\n", "V_BE= 0.7 # in V\n", "R_E=5*10**3 #in \u03a9\n", "R_C=5*10**3 #in \u03a9\n", "R_B= 20*10**3 # in \u03a9\n", "I_E= (V_CC-V_E)/R_E # in A\n", "# For pnp transistor V_BE= V_E-V_B\n", "V_B= V_E-V_BE # in V\n", "I_B= V_B/R_B # in A\n", "I_C= I_E-I_B # in A\n", "V_C= I_C*R_C-V_CC # in V\n", "beta= I_C/I_B \n", "alpha= I_C/I_E \n", "print \"The value of V_B = %0.1f Volts\" %V_B\n", "print \"The value of I_B = %0.3f mA\" %(I_B*10**3)\n", "print \"The value of I_E = %0.1f mA\" %(I_E*10**3)\n", "print \"The value of I_C = %0.3f mA\" %(I_C*10**3)\n", "print \"The value of V_C = %0.3f Volts\" %V_C \n", "print \"The value of beta is %0.1f \"%beta \n", "print \"The value of alpha is %0.2f \"%alpha" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of V_B = 0.3 Volts\n", "The value of I_B = 0.015 mA\n", "The value of I_E = 0.8 mA\n", "The value of I_C = 0.785 mA\n", "The value of V_C = -1.075 Volts\n", "The value of beta is 52.3 \n", "The value of alpha is 0.98 \n" ] } ], "prompt_number": 37 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.30 - page 276" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "V_CC=5 # in V\n", "V_T= 0.025 # in V\n", "R_C=7.5*10**3 #in \u03a9\n", "I_C= 0.5 # in mA\n", "I_C= I_C*10**-3 # in A\n", "I_E=I_C # (approx) in A\n", "V_C= V_CC-I_C*R_C # in V\n", "print \"dc voltage at the collector = %0.2f Volt\" %V_C\n", "gm= I_C/V_T # in A/V\n", "print \"The value of gm = %0.f mA/V\" %(gm*10**3)\n", "# v_be= -v_i\n", "# v_c= -gm*v_be*R_C\n", "vcbyvi= gm*R_C # in V/V\n", "print \"The value of vc/vi = %0.f V/V\" %(vcbyvi)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "dc voltage at the collector = 1.25 Volt\n", "The value of gm = 20 mA/V\n", "The value of vc/vi = 150 V/V\n" ] } ], "prompt_number": 38 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.31 - page 277" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "V_T= 0.025 # in V\n", "I_E= 0.5 # in mA\n", "I_E= I_E*10**-3 # in mA\n", "Rsig= 50 # in \u03a9\n", "R_C= 5*10**3 # in \u03a9\n", "re= V_T/I_E # in ohm\n", "Rin= Rsig+re # in ohm\n", "print \"Input resistance = %0.f \u03a9\" %Rin\n", "# Part(b)\n", "# vo= -0.99*ie*R_C and ie= -v_sig/Rin\n", "vo_by_v_sig= 0.99*R_C/Rin # in V/V\n", "print \"The value of vo/vsig = %0.1f V/V\" %(vo_by_v_sig)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Input resistance = 100 \u03a9\n", "The value of vo/vsig = 49.5 V/V\n" ] } ], "prompt_number": 39 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.32 - page 278" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "beta= 200 \n", "alpha= beta/(1+beta) \n", "R_C= 100 # in \u03a9\n", "R_B= 10 # in k\u03a9\n", "Rsig= 1 # in k\u03a9\n", "Rsig= Rsig*10**3 # in \u03a9\n", "R_B= R_B*10**3 # in \u03a9\n", "V_T= 25*10**-3 \n", "V=1.5 # in V\n", "I_E= 10 # in mA\n", "I_E= I_E*10**-3 # in A\n", "I_C= alpha*I_E # in A\n", "V_C= I_C*R_C # in V\n", "I_B= I_C/beta # in A\n", "V_B= V-(R_B*I_B)\n", "gm= I_C/V_T # in A/V\n", "rpi= beta/gm # in \u03a9\n", "Rib= rpi # in \u03a9\n", "print \"The value of Rib = %0.2f \u03a9 \" %Rib\n", "Rin= R_B*rpi/(R_B+rpi) # in \u03a9\n", "print \"The value of Rin = %0.2f \u03a9\" %Rin\n", "# vbe= v_sig*Rin/(Rsig+Rin) \n", "vbe_by_vsig= Rin/(Rsig+Rin) \n", "# vo= -gm*vbe*R_C and = -gm*v_sig*Rin/(Rsig+Rin)\n", "vo_by_vsig= -gm*R_C*vbe_by_vsig # in V/V\n", "print \"Overall voltage gain = %0.2f V/V\" %vo_by_vsig\n", "# if \n", "vo= 0.4 #(\u00b1) in V\n", "vs= vo/abs(vo_by_vsig) # in V\n", "vbe= vbe_by_vsig*vs # in V\n", "print \"The value of v_sig = %0.2f mV\" %(vs*10**3)\n", "print \"The value of v_be = %0.2f mV\" %(vbe*10**3)\n", "\n", "# Note: There is some difference between in this coding and book solution. But Coding is correct." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of Rib = 502.50 \u03a9 \n", "The value of Rin = 478.46 \u03a9\n", "Overall voltage gain = -12.88 V/V\n", "The value of v_sig = 31.06 mV\n", "The value of v_be = 10.05 mV\n" ] } ], "prompt_number": 40 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 3.33 - page 280" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "V_T= 0.025 # in V\n", "# Part(a)\n", "print \"Part (a) : \"\n", "V_BE= 690 # in mV\n", "V_BE=V_BE*10**-3 # in V\n", "I_C= 1 # in mA\n", "I_B= 50 # in \u00b5A\n", "I_C=I_C*10**-3 # in A\n", "I_B=I_B*10**-6 # in A\n", "beta= I_C/I_B \n", "alpha= beta/(1+beta) \n", "I_E= I_C/alpha # in A\n", "# I_C= I_S*exp(V_BE/V_T)\n", "I_S= I_C/(exp(V_BE/V_T)) \n", "print \"The value of beta is %0.1f \" %beta\n", "print \"The value of alpha is %0.4f \"%alpha\n", "print \"The value of I_E = %0.2f mA\" %(I_E*10**3)\n", "print \"The value of I_S = %0.2e A\" %I_S\n", "\n", "# Part(b)\n", "print \"Part (b) : \"\n", "V_BE= 690 # in mV\n", "V_BE=V_BE*10**-3 # in V\n", "I_C= 1 # in mA\n", "I_C=I_C*10**-3 # in A\n", "I_E= 1.070 # in mA\n", "I_E=I_E*10**-3 # in A\n", "beta= I_C/I_B \n", "alpha= I_C/I_E \n", "beta= alpha/(1-alpha) \n", "I_B= I_C/beta # in A\n", "# I_C= I_S*exp(V_BE/V_T)\n", "I_S= I_C/(exp(V_BE/V_T)) \n", "print \"The value of beta is %0.3f \" %beta\n", "print \"The value of alpha is %0.4f \"%alpha\n", "print \"The value of I_B = %0.2f \u00b5A\" %(I_B*10**6)\n", "print \"The value of I_S = %0.2e A\" %I_S\n", "\n", "# Part(c)\n", "print \"Part (C) : \"\n", "V_BE= 580 # in mV\n", "V_BE=V_BE*10**-3 # in V\n", "I_E= 0.137 # in mA\n", "I_B= 7 # in \u00b5A\n", "I_E=I_E*10**-3 # in A\n", "I_B=I_B*10**-6 # in A\n", "# I_C= alpha*I_E = bita*I_B\n", "beta= I_E/I_B-1 \n", "alpha= beta/(1+beta) \n", "I_C= beta*I_B # in A\n", "# I_C= I_S*exp(V_BE/V_T)\n", "I_S= I_C/(exp(V_BE/V_T)) \n", "print \"The value of beta is %0.3f \" %beta\n", "print \"The value of alpha is %0.4f \"%alpha\n", "print \"The value of I_C = %0.3f mA\" %(I_C*10**3)\n", "print \"The value of I_S = %0.3e A\" %I_S\n", "\n", "# Part(d)\n", "print \"Part (d) : \"\n", "V_BE= 780 # in mV\n", "V_BE=V_BE*10**-3 # in V\n", "I_C= 10.10 # in mA\n", "I_B= 120 # in \u00b5A\n", "I_C=I_C*10**-3 # in A\n", "I_B=I_B*10**-6 # in A\n", "beta= I_C/I_B \n", "alpha= beta/(1+beta) \n", "I_E= I_C/alpha # in A\n", "# I_C= I_S*%e**(V_BE/V_T)\n", "I_S= I_C/(exp(V_BE/V_T)) \n", "print \"The value of beta is %0.3f \" %beta\n", "print \"The value of alpha is %0.4f \"%alpha\n", "print \"The value of I_E = %0.2f mA\" %(I_E*10**3)\n", "print \"The value of I_S = %0.4e A\" %I_S\n", "\n", "# Part(e)\n", "print \"Part (e) : \"\n", "V_BE= 820 # in mV\n", "V_BE=V_BE*10**-3 # in V\n", "I_E= 75 # in mA\n", "I_B= 1050 # in \u00b5A\n", "I_E=I_E*10**-3 # in A\n", "I_B=I_B*10**-6 # in A\n", "# I_C= alpha*I_E = bita*I_B\n", "beta= I_E/I_B-1 \n", "alpha= beta/(1+beta) \n", "I_C= beta*I_B # in A\n", "# I_C= I_S*exp(V_BE/V_T)\n", "I_S= I_C/(exp(V_BE/V_T)) \n", "print \"The value of beta is %0.3f \" %beta\n", "print \"The value of alpha is %0.3f \"%alpha\n", "print \"The value of I_C = %0.2f mA\" %(I_C*10**3)\n", "print \"The value of I_S = %0.3e A\" %I_S" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Part (a) : \n", "The value of beta is 20.0 \n", "The value of alpha is 0.9524 \n", "The value of I_E = 1.05 mA\n", "The value of I_S = 1.03e-15 A\n", "Part (b) : \n", "The value of beta is 14.286 \n", "The value of alpha is 0.9346 \n", "The value of I_B = 70.00 \u00b5A\n", "The value of I_S = 1.03e-15 A\n", "Part (C) : \n", "The value of beta is 18.571 \n", "The value of alpha is 0.9489 \n", "The value of I_C = 0.130 mA\n", "The value of I_S = 1.092e-14 A\n", "Part (d) : \n", "The value of beta is 84.167 \n", "The value of alpha is 0.9883 \n", "The value of I_E = 10.22 mA\n", "The value of I_S = 2.8466e-16 A\n", "Part (e) : \n", "The value of beta is 70.429 \n", "The value of alpha is 0.986 \n", "The value of I_C = 73.95 mA\n", "The value of I_S = 4.208e-16 A\n" ] } ], "prompt_number": 41 } ], "metadata": {} } ] }