{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 5: Transistor Bias Circuits" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.1: DC_bias.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//ex5.1\n", "V_BB=10;\n", "V_CC=20;\n", "B_DC=200;\n", "R_B=47*10^3;\n", "R_C=330;\n", "V_BE=0.7;\n", "I_B=(V_BB-V_BE)/R_B;\n", "I_C=B_DC*I_B; //Q POINT\n", "V_CE=V_CC-I_C*R_C; //Q POINT\n", "I_C_sat=V_CC/R_C;\n", "I_c_peak=I_C_sat-I_C;\n", "I_b_peak=I_c_peak/B_DC;\n", "disp(I_C,'q point of I_C in amperes')\n", "disp(V_CE,'Q point of V_CE in volts')\n", "disp(I_b_peak,'peak base current in amperes')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.2: Input_resistance.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//ex5.2\n", "B_DC=125;\n", "R_E=10^3;\n", "R_IN_base=B_DC*R_E;\n", "disp(R_IN_base,'DC input resistance in ohms, looking in at the base of transistor')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.3: Voltage_divider_bias.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//ex5.3\n", "B_DC=100;\n", "R1=10*10^3;\n", "R2=5.6*10^3;\n", "R_C=1*10^3;\n", "R_E=560;\n", "V_CC=10;\n", "V_BE=0.7\n", "R_IN_base=B_DC*R_E;\n", "//We can neglect R_IN_base as it is equal to 10*R2\n", "disp(R_IN_base,'input resistance seen from base, which can be neglected as it is 10 times R2')\n", "V_B=(R2/(R1+R2))*V_CC;\n", "V_E=V_B-V_BE;\n", "I_E=V_E/R_E;\n", "I_C=I_E;\n", "V_CE=V_CC-I_C*(R_C+R_E);\n", "disp(V_CE,'V_CE in volts')\n", "disp(I_C,'I_C in amperes')\n", "disp('Since V_CE>0V, transistor is not in saturation')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.4: Voltage_bias_PNP.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//ex5.4\n", "V_EE=10;\n", "V_BE=0.7;\n", "B_DC=150;\n", "R1=22*10^3;\n", "R2=10*10^3;\n", "R_C=2.2*10^3;\n", "R_E=1*10^3;\n", "R_IN_base=B_DC*R_E; //R_IN_base>10*R2,so it can be neglected\n", "disp(R_IN_base,'input resistance in ohms as seen from base. it can be neglected as it is greater than 10 times R2')\n", "V_B=(R1/(R1+R2))*V_EE;\n", "V_E=V_B+V_BE;\n", "I_E=(V_EE-V_E)/R_E;\n", "I_C=I_E;\n", "V_C=I_C*R_C;\n", "V_EC=V_E-V_C;\n", "disp(I_C,'I_C collector current in amperes')\n", "disp(V_EC,'V_EC emitter-collector voltage in Volts')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.5: PNP_Transistor.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//ex5.5\n", "R1=68*10^3;\n", "R2=47*10^3;\n", "R_C=1.8*10^3;\n", "R_E=2.2*10^3;\n", "V_CC=-6;\n", "V_BE=0.7;\n", "B_DC=75;\n", "R_IN_base=B_DC*R_E;\n", "disp('input resistance as seen from base is not greater than 10 times R2 so it should be taken into account')\n", "//R_IN_base in parallel with R2\n", "V_B=((R2*R_IN_base)/(R2+R_IN_base)/(R1+(R2*R_IN_base)/(R2+R_IN_base)))*V_CC;\n", "V_E=V_B+V_BE;\n", "I_E=V_E/R_E;\n", "I_C=I_E;\n", "V_C=V_CC-I_C*R_C;\n", "V_CE=V_C-V_E;\n", "disp(I_C,'collector current in amperes')\n", "disp(V_CE,'collector emitter voltage in volts')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.6: Qpoint_base_bias.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//ex5.6\n", "V_CC=12;\n", "R_B=100*10^3;\n", "R_C=560;\n", "//FOR B_DC=85 AND V_BE=0.7V\n", "B_DC=85;\n", "V_BE=0.7;\n", "I_C_1=B_DC*(V_CC-V_BE)/R_B;\n", "V_CE_1=V_CC-I_C_1*R_C;\n", "//FOR B_DC=100 AND V_BE=0.6V\n", "B_DC=100;\n", "V_BE=0.6;\n", "I_C_2=B_DC*(V_CC-V_BE)/R_B;\n", "V_CE_2=V_CC-I_C_2*R_C;\n", "%_del_I_C=((I_C_2-I_C_1)/I_C_1)*100;\n", "%_del_V_CE=((V_CE_2-V_CE_1)/V_CE_1)*100;\n", "disp(%_del_I_C,'percent change in collector current')\n", "disp(%_del_V_CE,'percent change in collector emitter voltage')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.7: Emitter_bias.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//ex5.7\n", "V_CC=20;\n", "R_C=4.7*10^3;\n", "R_E=10*10^3;\n", "V_EE=-20;\n", "R_B=100*10^3;\n", "//FOR B_DC=85 AND V_BE=0.7V\n", "B_DC=85;\n", "V_BE=0.7;\n", "I_C_1=(-V_EE-V_BE)/(R_E+(R_B/B_DC));\n", "V_C=V_CC-I_C_1*R_C;\n", "I_E=I_C_1;\n", "V_E=V_EE+I_E*R_E;\n", "V_CE_1=V_C-V_E;\n", "disp(I_C_1)\n", "disp(V_CE_1)\n", "//FOR B_DC=100 AND V_BE=0.6V\n", "B_DC=100;\n", "V_BE=0.6;\n", "I_C_2=(-V_EE-V_BE)/(R_E+(R_B/B_DC));\n", "V_C=V_CC-I_C_2*R_C;\n", "I_E=I_C_2;\n", "V_E=V_EE+I_E*R_E;\n", "V_CE_2=V_C-V_E;\n", "disp(I_C_2)\n", "disp(V_CE_2)\n", "%_del_I_C=((I_C_2-I_C_1)/I_C_1)*100;\n", "%_del_V_CE=((V_CE_2-V_CE_1)/V_CE_1)*100;\n", "disp(%_del_I_C,'percent change in collector currrent')\n", "disp(%_del_V_CE,'percent change in collector emitter voltage')\n", "//plz note that the answers differ because of the number of places after the decimal that scilab generates" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.8: Q_point.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//ex5.8\n", "V_CC=10;\n", "B_DC=100;\n", "R_C=10*10^3;\n", "R_B=100*10^3;\n", "V_BE=0.7;\n", "I_C=(V_CC-V_BE)/(R_C+(R_B/B_DC));\n", "V_CE=V_CC-I_C*R_C;\n", "disp(I_C,'Q point of collector current in amperes')\n", "disp(V_CE,'Q point of collector-emitter voltage in volts' )" ] } ], "metadata": { "kernelspec": { "display_name": "Scilab", "language": "scilab", "name": "scilab" }, "language_info": { "file_extension": ".sce", "help_links": [ { "text": "MetaKernel Magics", "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" } ], "mimetype": "text/x-octave", "name": "scilab", "version": "0.7.1" } }, "nbformat": 4, "nbformat_minor": 0 }