{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 30 : Field Effect Transistors"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 30_1 Page No. 984"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Value of Id for Vgs is 0 Volts = 0.01 Amps\n",
      "i.e 10 mAmps\n",
      "The Value of Id for Vgs is -0.5 Volts = 0.0077 Amps\n",
      "i.e 7.65 mAmps\n",
      "The Value of Id for Vgs is -1 Volts = 0.0056 Amps\n",
      "i.e 5.62 mAmps\n",
      "The Value of Id for Vgs is -2 Volts = 0.0025 Amps\n",
      "i.e 2.5 mAmps\n",
      "The Value of Id for Vgs is -3 Volts = 0.0006 Amps\n",
      "i.e 0.625 mAmps\n"
     ]
    }
   ],
   "source": [
    "# Determine Id for each value of Vgs (a) 0V# (b) -0.5V# (c) -1V (d) -2V (e) -3V\n",
    "\n",
    "# Given Data\n",
    "\n",
    "Vgs1 = 0#           # Voltage Gate-Source 1=0 Volts\n",
    "Vgs2 = -0.5#        # Voltage Gate-Source 2=-0.5 Volts\n",
    "Vgs3 = -1.#          # Voltage Gate-Source 3=-1 Volts\n",
    "Vgs4 = -2.#          # Voltage Gate-Source 4=-2 Volts\n",
    "Vgs5 = -3.#          # Voltage Gate-Source 5=-3 Volts\n",
    "Vgsoff = -4.#        # Voltage Gate-Source(off)=-4 Volts\n",
    "Idss = 10.*10**-3     # Idss = 10m Amps\n",
    "\n",
    "a = (1-(Vgs1/Vgsoff))\n",
    "b = (1-(Vgs2/Vgsoff))\n",
    "c = (1-(Vgs3/Vgsoff))\n",
    "d = (1-(Vgs4/Vgsoff))\n",
    "e = (1-(Vgs5/Vgsoff))\n",
    "\n",
    "# Vgs = 0 Volts\n",
    "\n",
    "Id1 = Idss*a*a\n",
    "print 'The Value of Id for Vgs is 0 Volts = %0.2f Amps'%Id1\n",
    "print 'i.e 10 mAmps'\n",
    "\n",
    "# Vgs = -0.5 Volts\n",
    "\n",
    "Id2 = Idss*b*b\n",
    "print 'The Value of Id for Vgs is -0.5 Volts = %0.4f Amps'%Id2\n",
    "print 'i.e 7.65 mAmps'\n",
    "\n",
    "# Vgs = -1 Volts\n",
    "\n",
    "Id3 = Idss*c*c\n",
    "print 'The Value of Id for Vgs is -1 Volts = %0.4f Amps'%Id3\n",
    "print 'i.e 5.62 mAmps'\n",
    "\n",
    "# Vgs = -2 Volts\n",
    "\n",
    "Id4 = Idss*d*d\n",
    "print 'The Value of Id for Vgs is -2 Volts = %0.4f Amps'%Id4\n",
    "print 'i.e 2.5 mAmps'\n",
    "\n",
    "# Vgs = -3 Volts\n",
    "\n",
    "Id5 = Idss*e*e\n",
    "print 'The Value of Id for Vgs is -3 Volts = %0.4f Amps'%Id5\n",
    "print 'i.e 0.625 mAmps'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 30_2 Page No. 985"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Value of Id = 1.2500e-04 Amps using Minimum Values\n",
      "i.e 125 uAmps\n",
      "The Value of Vds = 1.88 Volts using Minimum Values\n",
      "The Value of Id = 0.0132 Amps using Maximum Values\n",
      "i.e 13.2 mAmps\n",
      "The Value of Vds = -11.20 Volts using Maximun Values\n",
      "The Value of Vds(p) = 6.50 Volts using Maximun Values\n"
     ]
    }
   ],
   "source": [
    "# Find the minimim and maximum value of Id and Vds if Vgs=-1.5 Volts\n",
    "\n",
    "# Given Data\n",
    "\n",
    "Idssmin = 2.*10**-3#      # Idss(min)=2m Amp\n",
    "Idssmax = 20.*10**-3#     # Idss(max)=20m Amp\n",
    "Vgs = -1.5#             # Voltage Gate-Source=-1.5V\n",
    "Vgsoffmin = -2.#         # Voltage Gate-Source(off)(min)=-2 Volts\n",
    "Vgsoffmax = -8.#         # Voltage Gate-Source(off)(max)=-8 Volts\n",
    "Vdd = 2.0#               # Supply Voltage(Drain)=20 Volts\n",
    "Rd = 1.*10**3#            # Drain Resistance=1k Ohms\n",
    "\n",
    "a = 1-(Vgs/Vgsoffmin)#\n",
    "b = 1-(Vgs/Vgsoffmax)#\n",
    "\n",
    "# Calculation using Minimum Values\n",
    "\n",
    "Id1 = Idssmin*a*a#\n",
    "print 'The Value of Id = %0.4e Amps using Minimum Values'%Id1\n",
    "print 'i.e 125 uAmps'\n",
    "\n",
    "Vds1 = Vdd-Id1*Rd#\n",
    "print 'The Value of Vds = %0.2f Volts using Minimum Values'%Vds1\n",
    "\n",
    "# Calculation using Maximum Values\n",
    "\n",
    "Id2 = Idssmax*b*b#\n",
    "print 'The Value of Id = %0.4f Amps using Maximum Values'%Id2\n",
    "print 'i.e 13.2 mAmps'\n",
    "\n",
    "Vds2 = Vdd-Id2*Rd#\n",
    "print 'The Value of Vds = %0.2f Volts using Maximun Values'%Vds2\n",
    "\n",
    "Vp = -Vgsoffmax#\n",
    "\n",
    "Vdsp = Vp+Vgs#\n",
    "print 'The Value of Vds(p) = %0.2f Volts using Maximun Values'%Vdsp"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 30_3 Page No. 989"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Drain Voltage Vd = 5.00 Volts\n"
     ]
    }
   ],
   "source": [
    "# Calculate the value of Vd\n",
    "\n",
    "# Given Data\n",
    "\n",
    "Vs = 1.#         # Voltage at Resistor Rs=1 Volts\n",
    "Rs = 200.#       # Source Resistor=200 Ohms\n",
    "Vdd = 10.#       # Supply Voltage(Drain)=10 Volts\n",
    "Rd = 1.*10**3#    # Drain Resistor=1k Ohms\n",
    "\n",
    "Is=Vs/Rs#\n",
    "\n",
    "Id = Is#\n",
    "\n",
    "Vd = Vdd-Id*Rd#\n",
    "print 'The Drain Voltage Vd = %0.2f Volts'%Vd,"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 30_4 Page No.  991"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Value of Vg = 3.06 Volts\n",
      "i.e 3 Volts\n",
      "The Value of Vs = 4.06 Volts\n",
      "i.e 4 Volts\n",
      "The Value of Id = 5.08e-03 Amps.\n",
      "i.e 5 mAmps\n",
      "The Value of Vd = 9.92 Volts\n",
      "Approx 10 Volts\n"
     ]
    }
   ],
   "source": [
    "# Calculate Vg, Vs, Id, Vd.\n",
    "\n",
    "# Given Data\n",
    "\n",
    "R1 = 390.*10**3#      # Resistor 1=390k Ohms\n",
    "R2 = 100.*10**3#      # Resistor 2=100k Ohms\n",
    "Rd = 1.*10**3#        # Drain Resistor=1k Ohms\n",
    "Vdd = 15.#           # Supply Voltage(Drain)=15 Volts\n",
    "Vgs = -1.#           # Voltage Gate-Source=-1 Volts\n",
    "Rs = 800.#           # Source Resistor=800 Ohms\n",
    "\n",
    "Vg = (R2/(R1+R2))*Vdd#\n",
    "print 'The Value of Vg = %0.2f Volts'%Vg\n",
    "print 'i.e 3 Volts'\n",
    "\n",
    "Vs = Vg-Vgs#\n",
    "print 'The Value of Vs = %0.2f Volts'%Vs\n",
    "print 'i.e 4 Volts'\n",
    "\n",
    "Id = Vs/Rs#\n",
    "print 'The Value of Id = %0.2e Amps.'%Id\n",
    "print 'i.e 5 mAmps'\n",
    "\n",
    "Vd = Vdd-Id*Rd\n",
    "print 'The Value of Vd = %0.2f Volts'%Vd\n",
    "print 'Approx 10 Volts'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 30_5 Page No.  992"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Drain Current Id = 6.50e-03 Amps\n",
      "i.e 6.5 mAmps\n",
      "The Drain Voltage Vd = 8.50 Voltage\n"
     ]
    }
   ],
   "source": [
    "# Calculate the value Drain Current Id and Drain Voltage Vd.\n",
    "\n",
    "# Given Data\n",
    "\n",
    "Vdd = 15#           # Supply Voltage(Drain)=15 Volts\n",
    "Vbe = 0.7#          # Voltage Base-Emitter=0.7 Volts\n",
    "Re = 2.2*10**3#      # Emitter Resistor=2.2 kOhms\n",
    "Rd = 1*10**3#        # Drain Resistor=1 kOhms\n",
    "Vee = 15#           # Supply Voltage(Emitter)=15 Volts\n",
    "\n",
    "\n",
    "Ic = (Vee-Vbe)/Re#\n",
    "\n",
    "Id = Ic#\n",
    "print 'The Drain Current Id = %0.2e Amps'%Id\n",
    "print 'i.e 6.5 mAmps'\n",
    "\n",
    "Vd = Vdd-Id*Rd#\n",
    "print 'The Drain Voltage Vd = %0.2f Voltage'%Vd"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 30_6 Page No. 997"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Voltage Gain Av =4.89\n",
      "Approx 4.875\n",
      "The Output Voltage Vo = 0.978 Volts(p-p)\n"
     ]
    }
   ],
   "source": [
    "# Calculate the Voltage Gain Av and Output Voltage Vo\n",
    "\n",
    "# Given Data\n",
    "\n",
    "Rd = 1.5*10**3#      # Drain Resistor=1.5 kOhms\n",
    "Rl = 10*10**3#       # Load Resistor=10 kOhms\n",
    "Idss = 10*10**-3#    # Idss=10 mAmps\n",
    "Vgs = -1#           # Voltage Gate-Source=-1 Volts\n",
    "Vgsoff = -4.#        # Voltage Gate-Source(off)=-4 Volts\n",
    "Vin = 0.2#          # Input Voltage=0.2 Volts(p-p)\n",
    "\n",
    "gmo = 2*Idss/(-Vgsoff)#\n",
    "\n",
    "gm = gmo*(1-(Vgs/Vgsoff))#\n",
    "\n",
    "rl = (Rd*Rl)/(Rd+Rl)#\n",
    "\n",
    "Av = gm*rl#\n",
    "print 'The Voltage Gain Av =%0.2f'%Av\n",
    "print 'Approx 4.875'\n",
    "\n",
    "Vo = Av*Vin\n",
    "print 'The Output Voltage Vo = %0.3f Volts(p-p)'%Vo"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 30_7 Page No.  998"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Voltage Gain Av =0.37\n",
      "The Output Voltage Vo = 0.37 Volts(p-p)\n",
      "The Output Impedence Zo = 143.28 Ohms\n",
      "Approx 143.5 Ohms\n"
     ]
    }
   ],
   "source": [
    "# Calculate Av, Vo & Zo.\n",
    "\n",
    "# Given Data\n",
    "\n",
    "Rs = 240.#           # Source Resistor=240 Ohms\n",
    "Rl = 1.8*10**3#      # Load Resistor=1.8 kOhms\n",
    "Vgsoff = -8.#        # Voltage Gate-Source(off)=-8 Volts\n",
    "Vgs = -2.#           # Voltage Gate-Source=-2 Volts\n",
    "Idss = 15.*10**-3     # Idss=15 mAmps.\n",
    "Vin = 1.#            # Input Voltage=1 Volts(p-p)\n",
    "\n",
    "rl = ((Rs*Rl)/(Rs+Rl))#\n",
    "gmo = 2*Idss/-Vgsoff#\n",
    "gm = gmo*(1-(Vgs/Vgsoff))#\n",
    "\n",
    "Av = gm*rl/(1+gm*rl)#\n",
    "print 'The Voltage Gain Av =%0.2f'%Av\n",
    "\n",
    "Vo = Av*Vin#\n",
    "print 'The Output Voltage Vo = %0.2f Volts(p-p)'%Vo\n",
    "\n",
    "A = (1/gm)#\n",
    "Zo = ((Rs*A)/(Rs+A))#\n",
    "print 'The Output Impedence Zo = %0.2f Ohms'%Zo"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 30_8 Page No. 1000"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Voltage Gain Av =4.17\n",
      "The Output Voltage = 4.17e-02 Volts(p-p)\n",
      "Approx 41.6 mVolts(p-p)\n",
      "The Output Impedence Zi = 114.29 Ohms\n",
      "Approx 114 Ohms\n"
     ]
    }
   ],
   "source": [
    "#Calculate Av, Vo, Zin.\n",
    "\n",
    "# Given Data\n",
    "\n",
    "Rd = 1.2*10**3#      # Drain Resistor=1.2 kOhms\n",
    "Rl = 15.*10**3#       # Load Resistor=15 kOhms\n",
    "gm = 3.75*10**-3#    # Transconductance=3.75 mSiemens\n",
    "Vin = 10.*10**-3#     # Input Voltage=10 mVpp\n",
    "Rs = 200.#           # Source Resistor=200 Ohms\n",
    "\n",
    "rl = ((Rd*Rl)/(Rd+Rl))#\n",
    "\n",
    "Av = gm*rl#\n",
    "print  'The Voltage Gain Av =%0.2f'%Av\n",
    "\n",
    "Vo = Av*Vin#\n",
    "print  'The Output Voltage = %0.2e Volts(p-p)'%Vo\n",
    "print 'Approx 41.6 mVolts(p-p)'\n",
    "\n",
    "A = (1/gm)#\n",
    "\n",
    "Zi = ((Rs*A)/(Rs+A))#\n",
    "print 'The Output Impedence Zi = %0.2f Ohms'%Zi\n",
    "print 'Approx 114 Ohms'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 30_9 Page No. 1001"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Value of Id for Vgs is 2 Volts = 2.25e-02 Amps\n",
      "i.e 22.5 mAmps\n",
      "The Value of Id for Vgs is -2 Volts = 2.50e-03 Amps\n",
      "i.e 2.5 mAmps\n",
      "The Value of Id for Vgs is 0 Volts = 1.00e-02 Amps\n",
      "i.e 10 mAmps\n"
     ]
    }
   ],
   "source": [
    "#Determine Id for each value of Vgs (a) 2V# (b) -2V# (c) 0V\n",
    "\n",
    "# Given Data\n",
    "Vgs1 = 2.#           # Voltage Gate-Source 1=2 Volts\n",
    "Vgs2 = -2.#          # Voltage Gate-Source 2=-2 Volts\n",
    "Vgs3 = 0#           # Voltage Gate-Source 3=0 Volts\n",
    "Vgsoff = -4.#        # Voltage Gate-Source(off)=-4 Volts\n",
    "Idss = 10.*10**-3#    # Idss = 10m Amps\n",
    "\n",
    "a = (1-(Vgs1/Vgsoff))#\n",
    "b = (1-(Vgs2/Vgsoff))#\n",
    "c = (1-(Vgs3/Vgsoff))#\n",
    "\n",
    "# Vgs = 2 Volts\n",
    "\n",
    "Id1 = Idss*a*a#\n",
    "print 'The Value of Id for Vgs is 2 Volts = %0.2e Amps'%Id1\n",
    "print 'i.e 22.5 mAmps'\n",
    "\n",
    "# Vgs = -2 Volts\n",
    "\n",
    "Id2 = Idss*b*b#\n",
    "print 'The Value of Id for Vgs is -2 Volts = %0.2e Amps'%Id2\n",
    "print 'i.e 2.5 mAmps'\n",
    "\n",
    "# Vgs = 0 Volts\n",
    "\n",
    "Id3 = Idss*c*c#\n",
    "print 'The Value of Id for Vgs is 0 Volts = %0.2e Amps'%Id3\n",
    "print 'i.e 10 mAmps'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 30_10 Page No. 1002"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Drain Resistance = 500.00 Ohms\n",
      "A 470 Ohms resistor would provide the proper biasing voltage at the  gate\n"
     ]
    }
   ],
   "source": [
    "# Calculate the value of Rd to provide an Id(on) of 10m Amps.\n",
    "\n",
    "# Given Data\n",
    "\n",
    "Vdd = 15.#           # Suppy Voltage(Drain)=15 Volts\n",
    "Vgson = 10.#         # Voltage Gate-Source(on)=10 Volts\n",
    "Idon = 10.*10**-3#    # Drain Current(on)=10m Amps\n",
    "\n",
    "Rd = (Vdd-Vgson)/Idon#\n",
    "print 'The Drain Resistance = %0.2f Ohms'%Rd\n",
    "\n",
    "print 'A 470 Ohms resistor would provide the proper biasing voltage at the  gate'"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "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.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}