{
 "metadata": {
  "name": "",
  "signature": "sha256:b7f7c4ef1c921f59869e52c8d35d2ca9045be346fb4ed98e35eda7b3b4c8beef"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter - 4 : Optoelectronic Devices"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.1 : Page No - 138"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "#Given data\n",
      "Ep= 0.0153*10**-17 #in J\n",
      "lamda= 1300 # in nm\n",
      "nita_ext= 0.1 \n",
      "e = 1.6*10**-19 #in C\n",
      "Eg= 1.42*e # in eV\n",
      "S= nita_ext*Eg/e # in W/A  (where S= deltaP/deltaI  )\n",
      "print \" Slope of efficiency = %0.4f W/A\" %S\n",
      "\n",
      "# Note: In the book, the evaluated value of Eg/e is wrong because the value of 1.42*e/e = 1.42 not equal to 0.956 , \n",
      "#  Hence the answer in the book is wrong "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Slope of efficiency = 0.1420 W/A\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.2 : Page No - 138"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "e = 1.6*10**-19 #in C\n",
      "Eg= 1.48*e # in J\n",
      "R=1 # in \u03a9\n",
      "i_p= 100 # in mA\n",
      "i_p= i_p*10**-3 # in A\n",
      "i_F= 10 # in mA\n",
      "i_F= i_F*10**-3 # in A\n",
      "Popt= 1.25 # in mW\n",
      "Popt= Popt*10**-3 # in W\n",
      "nitaP= Popt/((i_p**2*Eg/e)+i_F**2*R)*100 # in %\n",
      "print \" Power efficiency = %0.1f %%\" %nitaP"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Power efficiency = 8.4 %\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.3 : Page No - 139"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "lamda= 670 # in nm\n",
      "h_int= 1/100 \n",
      "EpIn_eV= 1248/lamda # in eV\n",
      "I=50 # in mA\n",
      "P= h_int*EpIn_eV*I # in mW\n",
      "print \" Power radiated by an LED = %0.2f mW\" %P\n",
      "\n",
      "# Note : There is a calculation error in evaluating the value of P so the answer in the book is wrong"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Power radiated by an LED = 0.93 mW\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.4 : Page No - 139"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "I=40 # in mA\n",
      "I=I*10**-3 # in A\n",
      "lamda=1310*10**-9 # in m\n",
      "h= 6.62*10**-34  # in Js\n",
      "c= 3*10**8 # in m/s\n",
      "e= 1.6*10**-19 # in C\n",
      "toh_r= 30 # in ns\n",
      "toh_nr= 100 # in ns\n",
      "toh= toh_r*toh_nr/(toh_r+toh_nr) \n",
      "nita_int= toh/toh_r \n",
      "print \" The internal quantum efficiency = %0.2f\" %nita_int\n",
      "Ep= h*c/lamda # in J\n",
      "P= nita_int*Ep*I/e # in W\n",
      "print \" The optical power generated internally to the LED = %0.2f mW\" %(P*10**3)\n",
      " \n",
      "# Note : There is a calculation error in evaluating the value of P so the answer in the book is wrong"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The internal quantum efficiency = 0.77\n",
        " The optical power generated internally to the LED = 29.15 mW\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.5 : Page No - 140"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "# Part (a)\n",
      "R= 0.85 # in A/W\n",
      "Pop= 1 # in mW\n",
      "Ip= R*Pop # in mA\n",
      "print \"Part (a) :  The photocurrent = %0.2f mA\" %Ip\n",
      "print \"Part (b) :  If the incident light power is 2mW then it is not proportional to Pop\"\n",
      "print \"            so it can not be found the value of photocurrent\" "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Part (a) :  The photocurrent = 0.85 mA\n",
        "Part (b) :  If the incident light power is 2mW then it is not proportional to Pop\n",
        "            so it can not be found the value of photocurrent\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.6 : Page No - 141"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "N1= 5.4*10**6 # Number of EHPs generated\n",
      "N2= 6*10**6 # Number of incident photons\n",
      "nita= N1/N2 \n",
      "print \" The quantum efficiency at 1300 nm = %0.f %%\" %(nita*100)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The quantum efficiency at 1300 nm = 90 %\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.7 : Page No - 141"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "e= 1.6*10**-19 # in C\n",
      "Eg= 0.75*e # in J\n",
      "h= 6.62*10**-34  # in Js\n",
      "c= 3*10**8 # in m/s\n",
      "n=70/100 \n",
      "# Formula Eg= h*c/lamda\n",
      "lamda= h*c/Eg # in m\n",
      "lamda=lamda*10**9 # in nm\n",
      "R= n*lamda/1248 # in A/W\n",
      "print \" Responsivity = %0.3f A/W\" %R"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Responsivity = 0.928 A/W\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.8 : Page No - 142"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "n=50/100 \n",
      "lamda= 900 # in nm\n",
      "R= n*lamda/1248 # in A/W\n",
      "print \" Responsivity = %0.2f A/W\" %R\n",
      "\n",
      "# Part (b)\n",
      "Ip= 10**-6 # in A\n",
      "Pop= Ip/R # in W\n",
      "print \" The received optical power = %0.2e W\" %Pop\n",
      "\n",
      "# Part (c)\n",
      "h= 6.62*10**-34  # in Js\n",
      "c= 3*10**8 # in m/s\n",
      "# Pop= n*h*c/lamda\n",
      "n= Pop*lamda*10**-9/(h*c) \n",
      "print \" The corresponding number of received photons = %0.3e\" %n\n",
      "\n",
      "# Note : There is a calculation error in evaluating the value of n (number of received photons) ,\n",
      "#        so the answer in the book is wrong"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Responsivity = 0.36 A/W\n",
        " The received optical power = 2.77e-06 W\n",
        " The corresponding number of received photons = 1.257e+13\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.9 : Page No - 142"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "V=4 # in V\n",
      "Vr1= 0.7 # in V\n",
      "Vr2= 0.3 # in V\n",
      "R1= 4 # in k\u03a9\n",
      "R2= 4 # in k\u03a9\n",
      "I1= (V-Vr1)/R1 # in mA\n",
      "I2= (V-Vr2)/R2 # in mA\n",
      "print \" The value of I1 = %0.3f mA\" %I1\n",
      "print \" The value of I2 = %0.3f mA\" %I2"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The value of I1 = 0.825 mA\n",
        " The value of I2 = 0.925 mA\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.10 : Page No - 143"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "V_Dmin= 1.5 # in V\n",
      "V_Dmax= 2.3 # in V\n",
      "Vs= 10 # in V\n",
      "R1= 470 # in \u03a9\n",
      "Imax= (Vs-V_Dmin)/R1 # in A\n",
      "Imin=  (Vs-V_Dmax)/R1 # in A\n",
      "print \" The maximum value of current = %0.1f mA\" %(Imax*10**3)\n",
      "print \" The minimum value of current = %0.1f mA\" %(Imin*10**3)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The maximum value of current = 18.1 mA\n",
        " The minimum value of current = 16.4 mA\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.11 : Page No - 144"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "V_Dmin= 1.8 # in V\n",
      "V_Dmax= 3 # in V\n",
      "# Case first\n",
      "Vs= 24 # in V\n",
      "R1= 820 # in \u03a9\n",
      "Imin=  (Vs-V_Dmax)/R1 # in A\n",
      "Imax= (Vs-V_Dmin)/R1 # in A\n",
      "print \"The variation in current in first case = %0.1f mA\" %(Imax*10**3-Imin*10**3)\n",
      "# Case second\n",
      "Vs= 5 # in V\n",
      "R1= 120 # in \u03a9\n",
      "Imin=  (Vs-V_Dmax)/R1 # in A\n",
      "Imax= (Vs-V_Dmin)/R1 # in A\n",
      "print \"The variation in current in second case = %0.1f mA\" %(Imax*10**3-Imin*10**3)\n",
      "print \"The variation in current in first case is smaller than in second case, So the brighness in the first case will \"\n",
      "print \"remain constant , whereas in the second case it will be changing.\" "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The variation in current in first case = 1.5 mA\n",
        "The variation in current in second case = 10.0 mA\n",
        "The variation in current in first case is smaller than in second case, So the brighness in the first case will \n",
        "remain constant , whereas in the second case it will be changing.\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.12 : Page No - 144"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Vout= 8 # in V\n",
      "V_F= 1.8 # in V\n",
      "Ip_max= 16 # in mA\n",
      "Ip_max= Ip_max*10**-3 # in A\n",
      "I_F= Ip_max \n",
      "Rs1= (Vout-V_F)/I_F # in \u03a9\n",
      "print \"If V_F= 1.8, then the value of Rs = %0.1f \u03a9\" %Rs1\n",
      "# If \n",
      "V_F= 2.0 # in V\n",
      "Rs2= (Vout-V_F)/I_F # in \u03a9\n",
      "print \"If V_F= 2.0, then the value of Rs = %0.f \u03a9\" %Rs2\n",
      "print \"In either case, the smallest standard value resistor that has a value greater than \",round(Rs1,1),\"\u03a9 and\",int(round(Rs2)) \n",
      "print \"ohm  resistor .is the 390 \u03a9\" "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "If V_F= 1.8, then the value of Rs = 387.5 \u03a9\n",
        "If V_F= 2.0, then the value of Rs = 375 \u03a9\n",
        "In either case, the smallest standard value resistor that has a value greater than  387.5 \u03a9 and 375\n",
        "ohm  resistor .is the 390 \u03a9\n"
       ]
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.13 : Page No - 145"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Ip= 1 # in mA\n",
      "Pop= 1.5 # in mW\n",
      "R= Ip/Pop # in A/W\n",
      "print \" The responsivity of the photodiode = %0.2f A/W\" %R"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The responsivity of the photodiode = 0.67 A/W\n"
       ]
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.14 : Page No - 145"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "lamda= 800 # in nm\n",
      "EpIn_eV= 1248/lamda # in eV\n",
      "h_int= 5/100 \n",
      "I=50 # in mA\n",
      "P= h_int*EpIn_eV*I # in mW\n",
      "print \" Power radiated by an LED = %0.1f mW\" %P"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Power radiated by an LED = 3.9 mW\n"
       ]
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.15 : Page No - 146"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "toh_r= 35 # in ns\n",
      "toh_nr= 110 # in ns\n",
      "toh= toh_r*toh_nr/(toh_r+toh_nr) # in ns\n",
      "nita_int= toh/toh_r \n",
      "print \" The internal quantum efficiency = %0.2f\" %(nita_int*100)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The internal quantum efficiency = 75.86\n"
       ]
      }
     ],
     "prompt_number": 25
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.16 : Page No - 146"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "N1= 6*10**6 # Number of EHPs generated\n",
      "N2= 8*10**6 # Number of incident photons\n",
      "nita= N1/N2 \n",
      "print \" The quantum efficiency of photon detector = %0.f %%\" %(nita*100)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The quantum efficiency of photon detector = 75 %\n"
       ]
      }
     ],
     "prompt_number": 26
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.17 : Page No - 146"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "e= 1.6*10**-19 # in C\n",
      "Eg= 0.75*e # in J\n",
      "h= 6.62*10**-34  # in Js\n",
      "c= 3*10**8 # in m/s\n",
      "n=90/100 \n",
      "# Formula Eg= h*c/lamda\n",
      "lamda= h*c/Eg # in m\n",
      "lamda=lamda*10**9 # in nm\n",
      "R= n*lamda/1248 # in A/W\n",
      "print \" Responsivity = %0.2f A/W\" %R"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Responsivity = 1.19 A/W\n"
       ]
      }
     ],
     "prompt_number": 27
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.18 : Page No - 147"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "V_Dmin= 1 # in V\n",
      "V_Dmax= 2 # in V\n",
      "Vs= 20 # in V\n",
      "R1= 470 # in \u03a9\n",
      "Imax= (Vs-V_Dmin)/R1 # in A\n",
      "Imin=  (Vs-V_Dmax)/R1 # in A\n",
      "print \" The maximum value of current = %0.f mA\" %(Imax*10**3)\n",
      "print \" The maximum value of current = %0.2f mA\" %(Imin*10**3)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The maximum value of current = 40 mA\n",
        " The maximum value of current = 38.30 mA\n"
       ]
      }
     ],
     "prompt_number": 28
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.19 : Page No - 147"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "V_Dmin= 2.5 # in V\n",
      "V_Dmax= 5 # in V\n",
      "# Case First\n",
      "Vs= 25 # in V\n",
      "Rs= 250 # in \u03a9\n",
      "Imax= (Vs-V_Dmin)/Rs # in A\n",
      "Imin=  (Vs-V_Dmax)/Rs # in A\n",
      "print \"The variation in current in first case = %0.f mA\" %(Imax*10**3-Imin*10**3)\n",
      "# Case sec\n",
      "Vs= 10 # in V\n",
      "Rs= 130 # in \u03a9\n",
      "Imax= (Vs-V_Dmin)/Rs # in A\n",
      "Imin=  (Vs-V_Dmax)/Rs # in A\n",
      "print \"The variation in current in second case = %0.f mA\" %(Imax*10**3-Imin*10**3)\n",
      "print \"Hence for the 25-V supply, the brightness of LED will be constant and for 10 V , it will be change\" "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The variation in current in first case = 90 mA\n",
        "The variation in current in second case = 58 mA\n",
        "Hence for the 25-V supply, the brightness of LED will be constant and for 10 V , it will be change\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.20 : Page No - 148"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "V1= 0.3 # in V\n",
      "V2= 0.7 # in V\n",
      "R1= 6 # in k\u03a9\n",
      "R2= 6 # in k\u03a9\n",
      "Vs= 12 # in V\n",
      "I1= (Vs-V1)/R1 # in mA\n",
      "I2= (Vs-V2)/R2 # in mA\n",
      "print \" The value of I1 = %0.2f mA\" %I1\n",
      "print \" The value of I2 = %0.2f mA\" %I2"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The value of I1 = 1.95 mA\n",
        " The value of I2 = 1.88 mA\n"
       ]
      }
     ],
     "prompt_number": 30
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.21 : Page No - 148"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "n=40/100 \n",
      "lamda= 800 # in nm\n",
      "Ip = 2*10**-6 # in A\n",
      "R= n*lamda/1248 \n",
      "# part (b)\n",
      "Pop= Ip/R # in W\n",
      "print \" Responsivity = %0.3f\" %R\n",
      "print \" The received optical power = %0.2e watt\" %Pop"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Responsivity = 0.256\n",
        " The received optical power = 7.80e-06 watt\n"
       ]
      }
     ],
     "prompt_number": 31
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.22 : Page No - 149"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "I=35 # in mA\n",
      "I=I*10**-3 # in A\n",
      "lamda=1300*10**-9 # in m\n",
      "h= 6.62*10**-34  # in Js\n",
      "c= 3*10**8 # in m/s\n",
      "e= 1.6*10**-19 # in C\n",
      "toh_r= 30 # in ns\n",
      "toh_nr= 90 # in ns\n",
      "toh= toh_r*toh_nr/(toh_r+toh_nr) # in ns\n",
      "nita_int= toh/toh_r \n",
      "print \" The internal quantum efficiency = %0.2f\" %nita_int\n",
      "Ep= h*c/lamda # in J\n",
      "P= nita_int*Ep*I/e # in W\n",
      "print \" The optical power generated internally to the LED = %0.3f mW\" % (P*10**3)\n",
      " "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The internal quantum efficiency = 0.75\n",
        " The optical power generated internally to the LED = 25.064 mW\n"
       ]
      }
     ],
     "prompt_number": 32
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.23 : Page No - 150"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "lamda= 600 # in nm\n",
      "h_int= 4/100 \n",
      "EpIn_eV= 1248/lamda # in eV\n",
      "I=50 # in mA\n",
      "P= h_int*EpIn_eV*I # in mW\n",
      "print \" Power radiated by an LED = %0.2f mW\" %P"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Power radiated by an LED = 4.16 mW\n"
       ]
      }
     ],
     "prompt_number": 33
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.24 : Page No - 150"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "\n",
      "V_Dmin= 2 # in V\n",
      "V_Dmax= 4 # in V\n",
      "Vs= 15 # in V\n",
      "R1= 470 # in \u03a9\n",
      "Imax= (Vs-V_Dmin)/R1 # in A\n",
      "Imin=  (Vs-V_Dmax)/R1 # in A\n",
      "print \" The maximum value of current = %0.1f mA\" %(Imax*10**3)\n",
      "print \" The minimum value of current = %0.1f mA\" %(Imin*10**3)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The maximum value of current = 27.7 mA\n",
        " The minimum value of current = 23.4 mA\n"
       ]
      }
     ],
     "prompt_number": 34
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.25 : Page No - 150"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Vout= 10 # in V\n",
      "V_F= 2 # in V\n",
      "Ip_max= 15 # in mA\n",
      "Ip_max= Ip_max*10**-3 # in A\n",
      "I_F= Ip_max \n",
      "Rs= (Vout-V_F)/I_F # in \u03a9\n",
      "print \" The value of Rs = %0.1f \u03a9\" %Rs"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The value of Rs = 533.3 \u03a9\n"
       ]
      }
     ],
     "prompt_number": 35
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.26 : Page No - 151"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Ep= 0.0153*10**-17 #in J\n",
      "lamda= 1300 # in nm\n",
      "nita_ext= 0.1 \n",
      "e = 1.6*10**-19 #in C\n",
      "Eg= 1.42*e # in eV\n",
      "S= nita_ext*Eg/e # in W/A  (where S= deltaP/deltaI  )\n",
      "print \" Slope of efficiency = %0.4f W/A\" %S\n",
      "\n",
      "# Note: In the book, the evaluated value of Eg/e is wrong because the value of 1.42*e/e = 1.42 not equal to 0.956 , \n",
      "#  Hence the answer in the book is wrong "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Slope of efficiency = 0.1420 W/A\n"
       ]
      }
     ],
     "prompt_number": 36
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.27 : Page No - 151"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "e = 1.6*10**-19 #in C\n",
      "Eg= 1.48*e # in J\n",
      "R=1 # in \u03a9\n",
      "i_p= 100 # in mA\n",
      "i_p= i_p*10**-3 # in A\n",
      "i_F= 10 # in mA\n",
      "i_F= i_F*10**-3 # in A\n",
      "Popt= 1.25 # in mW\n",
      "Popt= Popt*10**-3 # in W\n",
      "nitaP= Popt/((i_p**2*Eg/e)+i_F**2*R)*100 # in %\n",
      "print \" Power efficiency = %0.1f %%\" %nitaP"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Power efficiency = 8.4 %\n"
       ]
      }
     ],
     "prompt_number": 37
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.28 : Page No 152"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import exp\n",
      "# Given data\n",
      "kT= 0.025 # in eV (Let as take T=300 K)\n",
      "E= 1.42/2 # in ev (Let E = E_C-E_F)\n",
      "FE= exp(-E/kT) \n",
      "print \" The probability of exciting electrons at conduction band = %0.2e \" %FE"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The probability of exciting electrons at conduction band = 4.63e-13 \n"
       ]
      }
     ],
     "prompt_number": 41
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example -  4.29 : Page No 152"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given data\n",
      "k= 1.38*10**-23 \n",
      "T= 300 # in K (assume)\n",
      "V_D= 0.7 # The depletion voltage for silicon\n",
      "e=1.6*10**-19 # in C\n",
      "# n_n/n_p= p_p/p_n = %e**(e*V_D/(k*T))\n",
      "ratio= exp(e*V_D/(k*T)) # ratio of majority to minority charge carriers in n and p of a silicon semiconductor\n",
      "print \" Ratio of majority to minority charge carriers in n and p of a silicon semiconductor = %0.1e\" %ratio"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Ratio of majority to minority charge carriers in n and p of a silicon semiconductor = 5.6e+11\n"
       ]
      }
     ],
     "prompt_number": 43
    }
   ],
   "metadata": {}
  }
 ]
}