summaryrefslogtreecommitdiff
path: root/Electronic_Principles/Chapter_5_New.ipynb
blob: cfea03f3c2a361c645fb5c2ac0661fe042aeba20 (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
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "CHAPTER 5 SPECIAL-PURPOSE DIODES"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5-1, Page 146"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "Vsmin=20             #Source voltage minimum(V)\n",
      "Vsmax=40             #Source voltage maximum(V)\n",
      "Vbd=10               #Breakdown voltage(V)\n",
      "R=0.82               #Resistance(KOhm)\n",
      "\n",
      "Vr1=Vsmin-Vbd        #voltage across resistor(V)\n",
      "Is1=Vr1/R            #Minimum current(mA)\n",
      "Vr2=Vsmax-Vbd        #voltage across resistor(V)\n",
      "Is2=Vr2/R            #Maximum current(mA)\n",
      "\n",
      "print 'Ideally, zener diode acts as a battery(of breakdown voltage = 10V) shown in figure 5-4b'\n",
      "print 'Minimum current Is1=',round(Is1,2),'mA'\n",
      "print 'Maximum current Is1=',round(Is2,2),'mA'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Ideally, zener diode acts as a battery(of breakdown voltage = 10V) shown in figure 5-4b\n",
        "Minimum current Is1= 12.2 mA\n",
        "Maximum current Is1= 36.59 mA\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5-2, Page 149"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "Vs=18                 #supply voltage(V)\n",
      "Rs=0.27               #source resistance(KOhm)\n",
      "RL=1                  #Load resistance(KOhm)\n",
      "Vz=10                 #Zener voltage(V)\n",
      "\n",
      "VTH=(RL/(Rs+RL))*Vs    #Thevenin voltage(V)\n",
      "\n",
      "print 'Thevenin voltage VTH = ',round(VTH,2),'V'\n",
      "print 'Thevenin voltage is greater than zener voltage, zener diode is operating in breakdown region.'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Thevenin voltage VTH =  14.17 V\n",
        "Thevenin voltage is greater than zener voltage, zener diode is operating in breakdown region.\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5-3, Page 149"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "Vs=18                 #supply voltage(V)\n",
      "Rs=0.27               #source resistance(KOhm)\n",
      "RL=1                  #Load resistance(KOhm)\n",
      "Vbd=10                #Zener voltage(V)\n",
      "\n",
      "Vr=Vs-Vbd            #voltage across resistor(V)\n",
      "Is=Vr/Rs              #Current(mA)\n",
      "IL=Vbd/RL            #Current(mA)\n",
      "Iz=Is-IL             #Zener current(mA)\n",
      "\n",
      "print 'Load current IL = ',IL,'mA'\n",
      "print 'Zener current Iz = ',round(Iz,2),'mA'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Load current IL =  10 mA\n",
        "Zener current Iz =  19.63 mA\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5-7, Page 153"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "Iz=20                    #zener current(mA)\n",
      "Rz=8.5                   #zener resistance(Ohm)\n",
      "Vbd=10                   #Zener voltage(V)\n",
      "\n",
      "DVL=Iz*Rz/1000           #change in load voltage(V)\n",
      "VL=Vbd+DVL               #Load voltage(V)\n",
      "\n",
      "print 'Change in load voltage DVL =',DVL,'V'\n",
      "print 'Load voltage with second approx., VL =',VL,'V'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Change in load voltage DVL = 0.17 V\n",
        "Load voltage with second approx., VL = 10.17 V\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5-8, Page 154"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "Rs=270                   #Source resistance (Ohm)\n",
      "Rz=8.5                   #zener resistance(Ohm)\n",
      "VRin=2                   #Zener voltage(V)\n",
      "\n",
      "VRout=(Rz/Rs)*VRin*1000  #Load ripple voltage(V)\n",
      "\n",
      "print 'Load ripple voltage VRout=',round(VRout,2),'mV'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Load ripple voltage VRout= 62.96 mV\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5-10, Page 157"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "Vil=22                 #input voltage range low(V)\n",
      "Vih=30                 #input voltage range high(V)\n",
      "Vz=12                  #regulated output voltage(V)\n",
      "Rl=140                 #Load resistance low(KOhm)\n",
      "Rh=10                  #Load resistance high(KOhm)\n",
      "\n",
      "RSmax=Rl*(float(Vil)/float(Vz)-1)  #Maximum series resistance\n",
      "\n",
      "print 'Maximum series resistance RSmax =',round(RSmax,2),'V'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum series resistance RSmax = 116.67 V\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5-11, Page 157"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "Vil=15                     #input voltage range low(V)\n",
      "Vih=20                     #input voltage range high(V)\n",
      "Vz=6.8                     #regulated output voltage(V)\n",
      "Il=5                       #Load current low(mA)\n",
      "Ih=20                      #Load current high(mA)\n",
      "\n",
      "RSmax=(Vil-float(Vz))/Ih*1000  #Maximum series resistance\n",
      "\n",
      "print 'Maximum series resistance RSmax =',RSmax,'V'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum series resistance RSmax = 410.0 V\n"
       ]
      }
     ],
     "prompt_number": 69
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5-12, Page 168"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "Vi=50                    #voatage supply(V)\n",
      "Rs=2.2                   #series resistance(KOhm)\n",
      "Vf=2                     #forward approx. voltage\n",
      "                    \n",
      "Is=(Vi-Vf)/Rs\n",
      "\n",
      "print 'LED current Is =',round(Is,2),'mA'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "LED current Is = 21.82 mA\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5-13, Page 168"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "Vs=9                     #voatage supply(V)\n",
      "Rs=470.0                 #series resistance(Ohm)\n",
      "Vf=2                     #forward approx. voltage\n",
      "                    \n",
      "Is=(Vs-Vf)/Rs\n",
      "\n",
      "print 'LED current Is =',round((Is*1000),2),'mA'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "LED current Is = 14.89 mA\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5-14, Page 169"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math\n",
      "\n",
      "Vac=20                   #AC voatage supply(V)\n",
      "Rs=680.0                 #series resistance(KOhm)\n",
      "                    \n",
      "Vacp=1.414*Vac            #peak source voltage(V)\n",
      "Is1=(Vacp/Rs)*1000        #approx. peak current(mA)\n",
      "Is2=Is1/math.pi              #average of half-wave current through LED(mA)\n",
      "P=(Vac)**2/Rs             #Power dissipation(W)\n",
      "\n",
      "print 'approx. peak LED current Is1 =',round(Is1,2),'mA'\n",
      "print 'average of half-wave current through LED Is2 =',round(Is2,2),'mA'\n",
      "print 'Power dissipation P =',round(P,2),'W'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "approx. peak LED current Is1 = 41.59 mA\n",
        "average of half-wave current through LED Is2 = 13.24 mA\n",
        "Power dissipation P = 0.59 W\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5-15, Page 170"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math\n",
      "\n",
      "Vs=120                   #AC voatage supply(V)\n",
      "f=60                     #frequency(Hz)\n",
      "C=0.68                   #series resistance(KOhm)\n",
      "                    \n",
      "Xc=1/(2*math.pi*f*C)*1000    #capacitive reactance(KOhm)\n",
      "Vacp=Vs*1.414\n",
      "Is1=(Vacp/Xc)             #approx. peak current(mA)\n",
      "Is2=Is1/math.pi              #average current through LED(mA)\n",
      "\n",
      "print 'Capacitance reactance Xc = ',round(Xc,2),'KOhm'\n",
      "print 'approx. peak LED current Is1 =',round(Is1,2),'mA'\n",
      "print 'average current through LED Is2 =',round(Is2,2),'mA'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Capacitance reactance Xc =  3.9 KOhm\n",
        "approx. peak LED current Is1 = 43.5 mA\n",
        "average current through LED Is2 = 13.85 mA\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}