summaryrefslogtreecommitdiff
path: root/sample_notebooks/vedantharish/Chapter1.ipynb
blob: e0d93a7e07f0a8b89fc08fcb9f5c6b02ad4b66a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
{
 "metadata": {
  "name": "",
  "signature": "sha256:436cc68a3a8c24e3b7ac0015b43ecd16f91e5c0db4fe34a46ea3f2fb33073dd6"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 1: Semiconductor Diodes"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.1(a), Page No.: 29"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Declaration\n",
      "V=0.5     #voltage of diode in V\n",
      "I=2       #current of diode in mA\n",
      "\n",
      "#Calculation\n",
      "R=(V/I)*1000     #resistance of diode,\n",
      "                 #converting current in Ampere from mA in calculation\n",
      "\n",
      "#Result\n",
      "print \"Resistance is \", R ,\"ohm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Resistance is  250.0 ohm\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.1(b), Page No.: 29"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Declaration\n",
      "V=0.8     #voltage of diode in V\n",
      "I=20       #current of diode in mA\n",
      "\n",
      "#Calculation\n",
      "R=(V/I)*1000     #resistance of diode,\n",
      "                 #converting current in Ampere from mA in calculation\n",
      "\n",
      "#Result\n",
      "print \"Resistance is \", R ,\"ohm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Resistance is  40.0 ohm\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.1(c), Page No.:29"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Declaration\n",
      "V= -10    #voltage of diode in V\n",
      "I= -1       #current of diode in microAmpere\n",
      "\n",
      "#Calculation\n",
      "R=(V/I)*1000*1000            #resistance of diode,\n",
      "                             #converting current in Ampere from microAmpere in calculation\n",
      "R=V/I*(1000/1000)*(1000/1000)#converting ohm into Mega-ohm                \n",
      "#Result\n",
      "print \"Resistance is \", R ,\"Mega-ohm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Resistance is  10 Mega-ohm\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.2(a), Page NO.:31"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Declaration\n",
      "I=2         #diode current in mA\n",
      "I1=4        #diode current choosen by 2 mA swing above given diode current of 2 mA.\n",
      "I2=0        #diode current choosen by 2 mA swing below given diode current of 2 mA.\n",
      "V1=0.76     #diode voltage at I1= 4 mA.\n",
      "V2=0.65     #diode voltage at I2= 0 mA.\n",
      "\n",
      "#Calculation\n",
      "\n",
      "R=((V1-V2)/(I1-I2))*1000  #R is AC resistance,\n",
      "                          #V1-V2 is change in voltage and I1-I2 is chnage in current.\n",
      "                          #multiplying by 1000 for  converting current into A from mA.\n",
      "#RESULT\n",
      "print \"Ac resistance is\",R,\"ohm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Ac resistance is 27.5 ohm\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.2(b),Page No.:31"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Declaration\n",
      "I=25         #diode current in mA\n",
      "I1=30        #diode current choosen by 5 mA swing above given diode current of 25 mA.\n",
      "I2=20        #diode current choosen by 5 mA swing below given diode current of 25 mA.\n",
      "V1=0.8       #diode voltage at I1= 30 mA.\n",
      "V2=0.78      #diode voltage at I2= 20 mA.\n",
      "\n",
      "#Calculation\n",
      "\n",
      "R=((V1-V2)/(I1-I2))*1000  #R is AC resistance,\n",
      "                          #V1-V2 is change in voltage and I1-I2 is chnage in current.\n",
      "                          #multiplying by 1000 for  converting current into A from mA.\n",
      "#RESULT\n",
      "print \"Ac resistance is\",R,\"ohm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Ac resistance is 2.0 ohm\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.2(c), Page No.:32"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Declaration\n",
      "\n",
      "I1=2        #diode current in mA. \n",
      "V1=0.7      #diode voltage in V.\n",
      "\n",
      "I2=25       #diode current in mA.\n",
      "V2=0.79     #diode voltage in V.\n",
      "\n",
      "\n",
      "#Calculation\n",
      "\n",
      "R1=(V1/I1)*1000     #R1 is DC resistance,            \n",
      "                    #multiplying by 1000 for  converting current into A from mA.\n",
      "\n",
      "R2=(V2/I2)*1000     #R2 is DC rresistance   \n",
      "                    #mulipying by 1000 for converting current into A from mA.\n",
      "\n",
      "#RESULT\n",
      "print \"Dc resistance at 2 mA is\",R1,\"ohm, which far exceeds AC resistance of 27.5 ohm\"\n",
      "\n",
      "print \"DC resistance at 25 mA is\",R2,\"ohm, which far exceeds AC resistance of 2 ohm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Dc resistance at 2 mA is 350.0 ohm, which far exceeds AC resistance of 27.5 ohm\n",
        "DC resistance at 25 mA is 31.6 ohm, which far exceeds AC resistance of 2 ohm\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.3, Page No.: 48-49"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Declaration\n",
      "\n",
      "V=10      #zener voltage in V.\n",
      "T=0.072   #Temperature coefficient.\n",
      "T1=100       #given temperature in celsius.\n",
      "To=25      #reference temperature in celsius\n",
      "\n",
      "#calculation\n",
      "\n",
      "V1=(T*V*(T1-To))/100     #nominal voltage for zener diode in V.\n",
      "\n",
      "             #Temperature coefficient is positive.\n",
      "             #new zener voltage is defined by V2.\n",
      "V2=V+V1\n",
      "\n",
      "#RESULT\n",
      "\n",
      "print \"Voltage for zener diode is\",V2,\"V\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Voltage for zener diode is 10.54 V\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": []
    }
   ],
   "metadata": {}
  }
 ]
}