{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 21: Bipolar Transistors" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 21.1, Page 445" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Output Current, I = 2.04 mA\n", "Output Voltage, V = 4.5 V\n" ] } ], "source": [ "import math\n", "#Initialization\n", "vcc=10 #voltage\n", "vbe=0.7 #voltage, base-to-emitter junction\n", "rb=910*10**3 #resistance in ohm\n", "hfe=200\n", "rc=2.7*10**3 #resistance in ohm\n", "\n", "#Calculation\n", "ib=(vcc-vbe)/rb #base current in ampere\n", "ic=hfe*ib #collector in current in ampere\n", "vo=vcc-(ic*rc) #output voltage\n", "\n", "#Result\n", "print'Output Current, I = %.2f mA'%(ic*10**3)\n", "print'Output Voltage, V = %.1f V'%vo" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 21.2, Page 445" ] }, { "cell_type": "code", "execution_count": 25, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Quiescent Output Voltage, V = 5.6 V\n" ] } ], "source": [ "import math\n", "#Initialization\n", "vcc=10 #voltage\n", "r2=10*10**3 #resistance in ohm\n", "r1=27*10**3 #resistance in ohm\n", "vbe=0.7 #voltage, base-to-emitter junction\n", "re=10**3 #resistance in ohm\n", "rc=2.2*10**3 #resistance in ohm\n", "\n", "#Calculation\n", "vb=vcc*(r2*(r1+r2)**-1) # base voltage\n", "ve=vb-vbe #emitter voltage\n", "ie=ve/re #emitter current\n", "ic=ie #collector current\n", "vo=vcc-(ic*rc) #output voltage\n", "\n", "#Result\n", "print'Quiescent Output Voltage, V = %.1f V'%vo\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 21.3, Page 448" ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Voltage Gain = -2.2 mA\n" ] } ], "source": [ "import math\n", "#Initialization\n", "re=10**3 #resistance in ohm\n", "rc=2.2*10**3 #resistance in ohm\n", "\n", "#Calculation\n", "gain=-rc/re #voltage gain\n", "\n", "#Result\n", "print'Voltage Gain = %.1f mA'%gain\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 21.4, Page 451" ] }, { "cell_type": "code", "execution_count": 20, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Voltage Gain = 64 Hz\n" ] } ], "source": [ "import math\n", "#Initialization\n", "r1=15*10**3 #resistance in ohm\n", "r2=47*10**3 #resistance in ohm\n", "C=220*10**-9 #capacitance in farad\n", "\n", "#Calculation\n", "ri=(r1*r2)/(r1+r2) #resistance in paraller\n", "fco=1/(2*math.pi*C*ri) #frequency in Hz\n", "\n", "\n", "#Result\n", "print'Voltage Gain = %d Hz'%round(fco)\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 21.5, Page 453" ] }, { "cell_type": "code", "execution_count": 26, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Quiescent Output Voltage, V = 2.0 V\n" ] } ], "source": [ "import math\n", "#Initialization\n", "vcc=10 #voltage\n", "r2=10*10**3 #resistance in ohm\n", "r1=27*10**3 #resistance in ohm\n", "vbe=0.7 #voltage, base-to-emitter junction\n", "re=10**3 #resistance in ohm\n", "rc=2.2*10**3 #resistance in ohm\n", "\n", "#Calculation\n", "vb=vcc*(r2*(r1+r2)**-1) # base voltage\n", "ve=vb-vbe #emitter voltage\n", "\n", "\n", "#Result\n", "print'Quiescent Output Voltage, V = %.1f V'%ve\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { "display_name": "Python [Root]", "language": "python", "name": "Python [Root]" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.12" } }, "nbformat": 4, "nbformat_minor": 0 }