{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "CHAPTER 11 CC AND CB AMPLIFIERS"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11-1, Page 348"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "VCC=10                #collector voltage(V)\n",
      "RE=4.3                #Emitter resistance(KOhm)\n",
      "R1=10                 #Base resistance1 (KOhm)\n",
      "R2=10                 #Base resistance2 (KOhm)\n",
      "VBE=0.7               #Base-emitter voltage drop(V)\n",
      "RL=10                 #Load Resistance(KOhm)\n",
      "VG=1                  #Input voltage(mV)\n",
      "RG=0.6                #internal resistance of source(KOhm)\n",
      "B=200                   #current gain \n",
      "\n",
      "VBB=VCC/2               #Base voltage(V)\n",
      "VE=VBB-VBE              #Emitter voltage(V)\n",
      "IE=VE/RE                #Emitter current(mA)\n",
      "re1=(25/IE)             #AC resistance(Ohm)\n",
      "re=RE*RL/(RE+RL)      #external ac resistance(KOhm)\n",
      "Zin_base=(re+(re1/1000))*B                               #input impedance of base(KOhm)\n",
      "Zin_stage=((R1**-1)+(Zin_base**-1)+(R2**-1))**-1  #input impedance of stage(KOhm)\n",
      "\n",
      "print 'input impedance of stage Zin(base) = ',round(Zin_base,2),'KOhm'\n",
      "print 'input impedance of stage Zin(stage) = ',round(Zin_stage,2),'KOhm'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "input impedance of stage Zin(base) =  606.4 KOhm\n",
        "input impedance of stage Zin(stage) =  4.96 KOhm\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11-2, Page 349"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "re=3.03               #Emitter resistance(KOhm)\n",
      "VG=1                  #Input voltage(mV)\n",
      "RG=0.6                #internal resistance of source(KOhm)\n",
      "B=200                 #current gain \n",
      "Zin=5                 #input impedance(KOhm)\n",
      "\n",
      "Vin=(Zin/(Zin+RG))*VG #input voltage(V)\n",
      "\n",
      "print 'Input voltage Vin = ',round(Vin,2),'V'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Input voltage Vin =  0.89 V\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11-3, Page 350"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "VCC=15                #collector voltage(V)\n",
      "RE=2.2                #Emitter resistance(KOhm)\n",
      "R1=4.7                #Base resistance1 (KOhm)\n",
      "R2=4.7                #Base resistance2 (KOhm)\n",
      "VBE=0.7               #Base-emitter voltage drop(V)\n",
      "RL=6.8                #Load Resistance(KOhm)\n",
      "VG=1                  #Input voltage(mV)\n",
      "RG=0.6                #internal resistance of source(KOhm)\n",
      "B=150                   #current gain \n",
      "\n",
      "VBB=VCC/2.0             #Base voltage(V)\n",
      "VE=VBB-VBE              #Emitter voltage(V)\n",
      "IE=VE/RE                #Emitter current(mA)\n",
      "re1=(25/IE)             #AC resistance(Ohm)\n",
      "re=RE*RL/(RE+RL)        #external ac resistance(KOhm)\n",
      "Zin_base=(re+(re1/1000))*B             #input impedance of base(KOhm)\n",
      "Zin_stage=((R1**-1)+(R2**-1))**-1      #input impedance of stage(KOhm)\n",
      "Av=re/(re+(re1/1000))                  #Voltage gain of stage\n",
      "Vin=(Zin_stage/(Zin_stage+RG))*VG      #input voltage(V)\n",
      "Vout=Av*Vin                            #output voltage(V)\n",
      "\n",
      "\n",
      "print 'input impedance of stage Zin(base) = ',round(Zin_base,2),'KOhm'\n",
      "print 'input impedance of stage Zin(stage) = ',Zin_stage,'KOhm'\n",
      "print 'voltage gain of emitter follower Av = ',round(Av,3)\n",
      "print 'Output volatge Vout = ',round(Vout,2),'V'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "input impedance of stage Zin(base) =  250.55 KOhm\n",
        "input impedance of stage Zin(stage) =  2.35 KOhm\n",
        "voltage gain of emitter follower Av =  0.995\n",
        "Output volatge Vout =  0.79 V\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11-4, Page 353"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "RG=600                #internal resistance of source(KOhm)\n",
      "B=300                 #current gain \n",
      "\n",
      "Zout=RG/B             #Output impedance(KOhm)\n",
      "\n",
      "print 'Output impedance Zout = ',Zout,'Ohm'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Output impedance Zout =  2 Ohm\n"
       ]
      }
     ],
     "prompt_number": 31
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11-5, Page 353"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "VCC=30                #collector voltage(V)\n",
      "RE=0.1                #Emitter resistance(KOhm)\n",
      "R1=10                 #Base resistance1 (KOhm)\n",
      "R2=10                 #Base resistance2 (KOhm)\n",
      "RL=0.1                #Load Resistance(KOhm)\n",
      "VG=1                  #Input voltage(mV)\n",
      "RG=0.6                #internal resistance of source(KOhm)\n",
      "B=300                 #current gain \n",
      "\n",
      "VBQ=VCC/2.0             #Base voltage(V)\n",
      "VEQ=VBQ                 #Emitter voltage(V), ignore VBE\n",
      "IEQ=VEQ/RE              #Emitter current(mA)\n",
      "re=(25/IEQ)             #AC resistance(Ohm)\n",
      "Zb=((RG**-1)+(R1**-1)+(R2**-1))**-1      #impedance looking back from base(KOhm)\n",
      "Z=Zb*1000/B                              #impedance after current gain (Ohm) \n",
      "Ze=Z+re                                  #impedance looking back into emitter(Ohm)\n",
      "Zout=(((RE*1000)**-1)+(Ze**-1))**-1             #Output impedance(Ohm)\n",
      "\n",
      "print 'Output impedance is Zout = ',round(Zout,2),'Ohm'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Output impedance is Zout =  1.91 Ohm\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11-6, Page 355"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "VCC=10                  #collector voltage(V)\n",
      "RE=0.68                 #Emitter resistance(KOhm)\n",
      "RC=3.6                  #Collector resistance (KOhm)\n",
      "re=0.18                 #Emitter resistance (KOhm)\n",
      "R1=10                   #Base resistance1 (KOhm)\n",
      "R2=2.2                  #Base resistance2 (KOhm)\n",
      "RG=0.6                  #internal resistance of source(KOhm)\n",
      "VBE=0.7                 #Base-emitter voltage drop(V)\n",
      "RL=0.27                 #Load resistance(KOhm)\n",
      "B=100                   #current gain \n",
      "\n",
      "VBB=(R1*R2/(R1+R2))     #Base voltage(V)\n",
      "VE=VBB-VBE              #Emitter voltage(V)\n",
      "IE=VE/RE                #Emitter current(mA)\n",
      "re=(25/IE)              #AC resistance(Ohm)\n",
      "Zin=B*RL                #input impedance (KOhm)\n",
      "rc=((RC**-1)+(Zin**-1))**-1 #ac collector resistance(KOhm)\n",
      "Av=rc/(re/1000)             #voltage gain of stage\n",
      "\n",
      "print 'voltage gain of CE stage Av = ',round(Av,2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "voltage gain of CE stage Av =  206.15\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11-7, Page 355"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "VCC=10                  #collector voltage(V)\n",
      "RE=0.68                 #Emitter resistance(KOhm)\n",
      "RC=3.6                  #Collector resistance (KOhm)\n",
      "re=0.18                 #Emitter resistance (KOhm)\n",
      "R1=10.0                   #Base resistance1 (KOhm)\n",
      "R2=2.2                  #Base resistance2 (KOhm)\n",
      "RG=0.6                  #internal resistance of source(KOhm)\n",
      "VBE=0.7                 #Base-emitter voltage drop(V)\n",
      "RL=0.27                 #Load resistance(KOhm)\n",
      "B=100                   #current gain \n",
      "\n",
      "VBB=10*(R2/(R1+R2))     #Base voltage(V)\n",
      "VE=VBB-VBE              #Emitter voltage(V)\n",
      "IE=VE/RE                #Emitter current(mA)\n",
      "re=(25/IE)              #AC resistance(Ohm)\n",
      "rc=((RC**-1)+(RL**-1))**-1 #ac collector resistance(KOhm)\n",
      "Av=rc/(re/1000)             #voltage gain of stage\n",
      "\n",
      "print 'voltage gain of CE stage Av = ',round(Av,2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "voltage gain of CE stage Av =  16.3\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11-8, Page 358"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "VCC=15                   #collector voltage(V)\n",
      "RE=0.06                  #Emitter resistance(KOhm)\n",
      "R1=10.0                    #Base resistance1 (KOhm)\n",
      "R2=20.0                    #Base resistance2 (KOhm)\n",
      "RG=0.6                   #internal resistance of source(KOhm)\n",
      "VBE=0.7                  #Base-emitter voltage drop(V)\n",
      "RL=0.03                  #Load resistance(KOhm)\n",
      "B1=100                   #current gain of Q1\n",
      "B2=100                   #current gain of Q2\n",
      "\n",
      "B=B1*B2                 #Overall current gain\n",
      "VBB=15*(R2/(R1+R2))  #Base voltage(V)\n",
      "VE=VBB-(2*VBE)              #Emitter voltage(V)\n",
      "IE2=VE/RE                #Emitter current(mA)\n",
      "IB2=IE2/B2               #Base current of Q2(mA)\n",
      "IE1=IB2                  #emiter current of Q1(mA)\n",
      "IB1=IE1*1000/B1               #base current of Q1(uA)\n",
      "re=((RE**-1)+(RL**-1))**-1 #ac emitter resistance(KOhm)\n",
      "Zin_base=B*re              #input impedance of Q1(KOhm)\n",
      "\n",
      "print 'Overall current gain B = ',B\n",
      "print 'base current of Q1 IB1 = ',round(IB1,2),'uA'\n",
      "print 'input impedance at base of Q1 Zin(base) = ',Zin_base,'KOhm'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Overall current gain B =  10000\n",
        "base current of Q1 IB1 =  14.33 uA\n",
        "input impedance at base of Q1 Zin(base) =  200.0 KOhm\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11-9, Page 361"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "Vin=20                   #input voltage (V)\n",
      "RL=15                    #Load resistance(Ohm)\n",
      "Vz=10                    #voltage across zener(V)\n",
      "B=100                    #current gain\n",
      "Rs=680.0                 #series resistor(Ohm)\n",
      "\n",
      "Vout=Vz-0.7              #Output voltage approx.(V)\n",
      "Iout=Vout/RL             #Load current(A)\n",
      "IB=Iout*1000/B           #base current(mA)\n",
      "Is=(Vin-Vz)*1000/Rs      #current through series resistor(mA)\n",
      "Iz=Is-IB                 #zener current(mA)\n",
      "\n",
      "print 'output voltage Vout = ',Vout,'V'\n",
      "print 'Zener current Iz = ',round(Iz,2),'mA'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "output voltage Vout =  9.3 V\n",
        "Zener current Iz =  8.51 mA\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11-10, Page 362"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "Vin=30                   #input voltage (V)\n",
      "RL=100                   #Load resistance(Ohm)\n",
      "Vz=6.2                   #voltage across zener(V)\n",
      "B=100                    #current gain\n",
      "Rs=680.0                 #series resistor(Ohm)\n",
      "R1=1                     #Resistor (KOhm)\n",
      "R2=2                     #Resistor (KOhm)\n",
      "\n",
      "Vout=(Vz+0.7)*(R1+R2)/R1    #Output voltage approx.(V)\n",
      "I1=(Vz+0.7)/R1              #Load current(A)\n",
      "Vout=I1*(R1+R2)             #Output voltage(V)\n",
      "\n",
      "print 'output voltage Vout = ',Vout,'V'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "output voltage Vout =  20.7 V\n"
       ]
      }
     ],
     "prompt_number": 74
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11-11, Page 365"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "VG=2                    #AC input voltage (mV)\n",
      "Vs=10                    #supply volatge(V)\n",
      "RL=10                    #Load resistance(KOhm)\n",
      "RG=50.0                  #source resistor(Ohm)\n",
      "R1=10                    #Resistor (KOhm)\n",
      "R2=2.2                   #Resistor (KOhm)\n",
      "RC=3.6                   #collector resistor (KOhm)\n",
      "RE=2.2                   #emitter resistance(KOhm)\n",
      "\n",
      "VB=Vs*R2/(R1+R2)              #Base voltage(V)\n",
      "IE=(VB-0.7)*1000/RE           #emitter current(uA)\n",
      "re=(25/IE)*1000               #ac resistance(Ohm)\n",
      "Zin=1000*((RE**-1)+((re/1000)**-1))**-1   #input impedance(KOhm)\n",
      "Zout=RC                       #Output impedance(KOhm)\n",
      "rc=((RC**-1)+(RL**-1))**-1    #collector resistance(KOhm)\n",
      "Av=rc*1000/re                      #voltage gain\n",
      "Vin=(Zin/(Zin+RG))*VG              #input voltage(V)\n",
      "Vout=Av*Vin                        #output voltage(mV)\n",
      "\n",
      "print 'output voltage Vout = ',round(Vout,2),'mVpp'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "output voltage Vout =  52.43 mVpp\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}