summaryrefslogtreecommitdiff
path: root/Grobs_Basic_Electronics_by_M_E_Schultz/Chapter27.ipynb
blob: 77d3bb8287001be8e38aa1c688f9a2f2ba39930d (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
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 27 : Diodes and Diodes Applications"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 27_1 Page No.  864"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Forward Resistance at Point A = 59.09 Ohms\n",
      "Approx 59.1 Ohms\n",
      "The Forward Resistance at Point B = 31.11 Ohms\n"
     ]
    }
   ],
   "source": [
    "# For the diode curve, calculate the dc resistance, RF, at points A and B.\n",
    "\n",
    "# Given data\n",
    "\n",
    "Vf1 = 0.65#         # Forward votage 1=0.65 Volts\n",
    "If1 = 11*10**-3      # Forward current 1=11 mAmps\n",
    "Vf2 = 0.7#          # Forward votage 2=0.7 Volts\n",
    "If2 = 22.5*10**-3    # Forward current 2=22.5 mAmps\n",
    "\n",
    "Rf1 = Vf1/If1#\n",
    "print 'The Forward Resistance at Point A = %0.2f Ohms'%Rf1\n",
    "print 'Approx 59.1 Ohms'\n",
    "\n",
    "Rf2 = Vf2/If2#\n",
    "print 'The Forward Resistance at Point B = %0.2f Ohms'%Rf2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 27_2 Page No.  865"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Bulk Resistance = 0.40 Ohms\n"
     ]
    }
   ],
   "source": [
    "# A silicon diode has a forward voltage drop of 1.1 V for a forward diode current, If, of 1 A. Calculate the bulk resistance, Rb.\n",
    "\n",
    "# Given data\n",
    "\n",
    "Vf1 = 1.1#  # Forward votage 1=1.1 Volts\n",
    "If1 = 1.     # Forward current 1=1 Amps\n",
    "Vf2 = 0.7#  # Fwd. vltg. 2=0.7 Volts (min working vltg of diode is 0.7 V)\n",
    "If2 = 0     # Forward current=0 Amps\n",
    "\n",
    "delV = Vf1-Vf2#     # diff. between max. min. Voltages\n",
    "delI = If1-If2#     # diff. between max. min. Currents\n",
    "\n",
    "Rb = delV/delI#\n",
    "print 'The Bulk Resistance = %0.2f Ohms'%Rb"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 27_3  Page No.  868"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Load Voltage of First Approximation = 10.00 Volts(dc)\n",
      "The Load Current of First Approximation = 0.10 Amps\n",
      "i.e 100 mAmps\n",
      "The Load Voltage of Second Approximation = 9.30 Volts\n",
      "The Load Current of Second Approximation = 0.09 Amps\n",
      "i.e 93 mAmps\n",
      "The Load Current of Third Approximation = 0.09 Amps\n",
      "i.e 90.73 mAmps\n",
      "The Load Voltage of Third Approximation 9.07 Volts\n"
     ]
    }
   ],
   "source": [
    "# Solve for the load voltage and current using the first, second, and third diode approximations.\n",
    "\n",
    "# Given data\n",
    "\n",
    "Rl = 100.#       # Load resistance=100 Ohms\n",
    "Rb = 2.5#       # Resistance=2.5 Ohms\n",
    "Vin = 10.#       # Input voltage=10 Volts\n",
    "Vb = 0.7#       # Voltage=0.7 Volts\n",
    "\n",
    "\n",
    "# Using first approximation\n",
    "\n",
    "Vl1 = Vin\n",
    "print 'The Load Voltage of First Approximation = %0.2f Volts(dc)'%Vl1\n",
    "\n",
    "Il1 = Vl1/Rl#\n",
    "print 'The Load Current of First Approximation = %0.2f Amps'%Il1\n",
    "print 'i.e 100 mAmps'\n",
    "\n",
    "# Using second approximation\n",
    "\n",
    "Vl2 = Vin-Vb\n",
    "print 'The Load Voltage of Second Approximation = %0.2f Volts'%Vl2\n",
    "\n",
    "Il2 = Vl2/Rl#\n",
    "print 'The Load Current of Second Approximation = %0.2f Amps'%Il2\n",
    "print 'i.e 93 mAmps'\n",
    "\n",
    "# Using third approximation\n",
    "\n",
    "Il3 = (Vin-Vb)/(Rl+Rb)#\n",
    "print 'The Load Current of Third Approximation = %0.2f Amps'%Il3\n",
    "print 'i.e 90.73 mAmps'\n",
    "\n",
    "Vl3 = Il3*Rl#\n",
    "print 'The Load Voltage of Third Approximation %0.2f Volts'%Vl3"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 27_4 Page No.  875"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Secondary Voltage = 40.00 Volts(ac)\n",
      "The DC Voltage = 17.76 Volts\n",
      "The Load Current = 0.18 Amps\n",
      "The DC Diode Current = 0.18 Amps\n",
      "The PIV for Diode-1 = 56.56 Volts\n",
      "The Output Frequency = 60.00 Hertz\n"
     ]
    }
   ],
   "source": [
    "# If the turns ratio Np:Ns is 3:1, calculate the following: Vs, Vdc, Il, Idiode, PIV for D1, and fout.\n",
    "\n",
    "# Given data\n",
    "\n",
    "Vp = 120.#       # Primary voltage=120 Vac\n",
    "A = 3/1.#        # Turns ratio Np:Ns=3:1\n",
    "B = 1/3.#        # Turns ratio Ns:Np=1:3\n",
    "Rl = 100.#       # Load resistance=100 Ohms\n",
    "fi = 60.#        # Input frequency=60\n",
    "\n",
    "Vs = B*Vp#\n",
    "print 'The Secondary Voltage = %0.2f Volts(ac)'%Vs\n",
    "\n",
    "Vspk = (Vs*1.414)#\n",
    "\n",
    "C = Vspk-0.7#\n",
    "\n",
    "Vdc = 0.318*C#\n",
    "print 'The DC Voltage = %0.2f Volts'%Vdc\n",
    "\n",
    "Il = Vdc/Rl#\n",
    "print 'The Load Current = %0.2f Amps'%Il\n",
    "\n",
    "Idiode = Il#\n",
    "print 'The DC Diode Current = %0.2f Amps'%Idiode\n",
    "\n",
    "PIV = Vspk#\n",
    "print 'The PIV for Diode-1 = %0.2f Volts'%PIV\n",
    "\n",
    "fo =fi#\n",
    "print 'The Output Frequency = %0.2f Hertz'%fo"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 27_5 age No.  878"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The DC Voltage = 17.54 Volts\n",
      "The Load Current = 0.18 Amps\n",
      "i.e 175.4 mAmps\n",
      "The DC Diode Current = 0.09 Amps\n",
      "i.e 87.7 mAmps\n",
      "The PIV for Diode-1 = 55.86 Volts\n",
      "The Output Frequency = 120.00 Hertz\n"
     ]
    }
   ],
   "source": [
    "# If the turns ratio Np:Ns is\u0006 3:1, calculate the following: Vdc, Il, Idiode, PIV for D1, and fout.\n",
    "\n",
    "# Given data\n",
    "\n",
    "Vp = 120.       # Primary voltage=120 Vac\n",
    "A = 3/1.        # Turns ratio Np:Ns = 3:1\n",
    "B = 1/3.        # Turns ratio Ns:Np = 1:3\n",
    "Rl = 100.       # Load resistance=100 Ohms\n",
    "\n",
    "Vs = B*Vp#\n",
    "Vspk = 1.414*(Vs/2)#\n",
    "Vopk = Vspk-0.7#\n",
    "\n",
    "Vdc = 0.636*Vopk#\n",
    "print 'The DC Voltage = %0.2f Volts'%Vdc\n",
    "\n",
    "Il = Vdc/Rl#\n",
    "print 'The Load Current = %0.2f Amps'%Il\n",
    "print 'i.e 175.4 mAmps'\n",
    "\n",
    "Idiode = Il/2#\n",
    "print 'The DC Diode Current = %0.2f Amps'%Idiode\n",
    "print 'i.e 87.7 mAmps'\n",
    "\n",
    "C = (Vspk*2)-0.7#\n",
    "\n",
    "PIV = C#\n",
    "print 'The PIV for Diode-1 = %0.2f Volts'%PIV\n",
    "\n",
    "f =120#\n",
    "print 'The Output Frequency = %0.2f Hertz'%f"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 27_6 Page No.  880"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The DC Voltage = 35.08 Volts\n",
      "The Load Current = 0.35 Amps\n",
      "i.e 350.8 mAmps\n",
      "The DC Diode Current = 0.1754 Amps\n",
      "i.e 175.4 mAmps\n",
      "The PIV for each Diode = 55.86 Volts\n",
      "The Output Frequency = 120.00 Hertz\n"
     ]
    }
   ],
   "source": [
    "# If the turns ratio Np:Ns is\u0006 3:1, calculate the following: Vdc, Il, Idiode, PIV for each diode, and fout.\n",
    "\n",
    "# Given data\n",
    "\n",
    "Vp = 120.#       # Primary voltage=120 Vac\n",
    "A = 3./1#        # Turns ratio Np:Ns = 3:1\n",
    "B = 1./3#        # Turns ratio Ns:Np = 1:3\n",
    "Rl = 100.#       # Load resistance=100 Ohms\n",
    "\n",
    "Vs = B*Vp#\n",
    "Vspk = 1.414*(Vs)#\n",
    "Vopk = Vspk-1.4#\n",
    "\n",
    "Vdc = 0.636*Vopk#\n",
    "print 'The DC Voltage = %0.2f Volts'%Vdc\n",
    "\n",
    "Il = Vdc/Rl#\n",
    "print 'The Load Current = %0.2f Amps'%Il\n",
    "print 'i.e 350.8 mAmps'\n",
    "\n",
    "Idiode = Il/2#\n",
    "print 'The DC Diode Current = %0.4f Amps'%Idiode\n",
    "print 'i.e 175.4 mAmps'\n",
    "\n",
    "C = Vspk-0.7#\n",
    "\n",
    "PIV = C#\n",
    "print 'The PIV for each Diode = %0.2f Volts'%PIV\n",
    "\n",
    "f =120#\n",
    "print 'The Output Frequency = %0.2f Hertz'%f"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 27_7 Page No.  883"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Ripple Voltage for Turns Ratio Np:Ns=4:1 = 5.21 Volts(p-p)\n",
      "Approx 5.21 Volts(p-p)\n",
      "The DC Voltage for Turns Ratio Np:Ns=4:1 = 39.12 Volts\n",
      "Approx 39.12 Volts\n",
      "The Ripple Voltage for Turns Ratio Np:Ns=2:1 = 2.69 Volts(p-p)\n",
      "Approx 2.69 Volts(p-p)\n",
      "The DC Voltage for Turns Ratio Np:Ns=2:1 = 40.38 Volts\n",
      "Approx 40.38 Volts\n"
     ]
    }
   ],
   "source": [
    "from math import exp\n",
    "# Assume the transformer turns ratio Np:Ns = 4:1 in Fig. 27–21 a and 2:1 in Fig. 27–22a. Compare Vripple and Vdc if C =\u0006 500 uF and Rl =\u0006 250\u0007.\n",
    "    \n",
    "# Given data\n",
    "\n",
    "A1 = 4./1#           # Turns ratio Np:Ns=4:1\n",
    "B1 = 1./4#           # Turns ratio Ns:Np=1:4\n",
    "A2 = 2./1#           # Turns ratio Np:Ns=2:1\n",
    "B2 = 1./2#           # Turns ratio Ns:Np=1:2\n",
    "Vp = 120.#           # Primary voltage=120 Vac\n",
    "Vb = 0.7#           # \n",
    "t1 = 16.67*10**-3#   # Charging Time of Capacitor of Turns ratio Np:Ns=4:1=16.67 mSec\n",
    "t2 = 8.33*10**-3#    # Charging Time of Capacitor of Turns ratio Np:Ns=4:1=8.33 mSec\n",
    "Rl = 250.#           # Load resistance=250 Ohms\n",
    "C = 500.*10**-6#      # Capacitor=500 uFarad\n",
    "\n",
    "# Calculations for Turns Ratio Np:Ns=4:1\n",
    "\n",
    "Vs1 = B1*Vp#\n",
    "Vspk1 = Vs1*1.414#\n",
    "Vopk1 = Vspk1 - Vb#\n",
    "D = -t1/(Rl*C)#\n",
    "\n",
    "Vrp1 = Vopk1*(1-exp(D))#\n",
    "print 'The Ripple Voltage for Turns Ratio Np:Ns=4:1 = %0.2f Volts(p-p)'%Vrp1\n",
    "print 'Approx 5.21 Volts(p-p)'\n",
    "\n",
    "Vdc1 = Vopk1-(Vrp1/2)#\n",
    "print 'The DC Voltage for Turns Ratio Np:Ns=4:1 = %0.2f Volts'%Vdc1\n",
    "print 'Approx 39.12 Volts'\n",
    "\n",
    "# Calculations for Turns Ratio Np:Ns = 2:1\n",
    "\n",
    "Vs2 = B2*Vp#\n",
    "V2 = Vs2/2#\n",
    "V2pk2 = V2*1.414\n",
    "Vopk2 = V2pk2 - Vb#\n",
    "E = -t2/(Rl*C)#\n",
    "\n",
    "Vrp2 = Vopk2*(1-(exp(E)))\n",
    "print 'The Ripple Voltage for Turns Ratio Np:Ns=2:1 = %0.2f Volts(p-p)'%Vrp2\n",
    "print 'Approx 2.69 Volts(p-p)'\n",
    "\n",
    "Vdc2 = Vopk2-(Vrp2/2)#\n",
    "print 'The DC Voltage for Turns Ratio Np:Ns=2:1 = %0.2f Volts'%Vdc2\n",
    "print 'Approx 40.38 Volts'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 27_8 Page No.  885"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The LED Current = 0.01 Amps\n",
      "i.e 10 mAmps\n"
     ]
    }
   ],
   "source": [
    "#  Calculate the LED current.\n",
    "\n",
    "# Given data\n",
    "\n",
    "Vin = 24.#       # Input voltage=24 Volts\n",
    "Vled = 2.#       # Voltage drop at LED=2 Volts\n",
    "Rs = 2.2*10**3#  # Source Resistance=2.2 kOhms\n",
    "\n",
    "Iled = (Vin-Vled)/Rs#\n",
    "print 'The LED Current = %0.2f Amps'%Iled\n",
    "print 'i.e 10 mAmps'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 27_9 Page No.  888"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Resistance Rs, Required to Provide an LED Current of 25 mA = 880.00 Ohms\n"
     ]
    }
   ],
   "source": [
    "# Calculate the resistance Rs, required to provide an LED current of 25 mA.\n",
    "\n",
    "# Given data\n",
    "\n",
    "Vin = 24.#           # Input voltage=24 Volts\n",
    "Vled = 2.#           # Voltage drop at LED=2 Volts\n",
    "Iled = 25.*10**-3#    # LED Current=25 mAmps\n",
    "\n",
    "Rs = (Vin-Vled)/Iled#\n",
    "print 'The Resistance Rs, Required to Provide an LED Current of 25 mA = %0.2f Ohms'%Rs"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 27_10 Page No.  889"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Maximum Rated Current of Zener = 0.10 Amps\n",
      "i.e 100 mAmps\n"
     ]
    }
   ],
   "source": [
    "# Calculate the maximum rated zener current for a 1 W, 10 V zener.\n",
    "\n",
    "# Given data\n",
    "\n",
    "Pzm = 1.#        # Power rating of zener= 1 Watts\n",
    "Vz = 10.#        # Voltage rating of zener= 10 Volts\n",
    "\n",
    "Izm = Pzm/Vz#\n",
    "print 'The Maximum Rated Current of Zener = %0.2f Amps'%Izm\n",
    "print 'i.e 100 mAmps'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 27_11 Page No.  890"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Zener Current = 0.01 Amps\n",
      "i.e 15 mAmps\n"
     ]
    }
   ],
   "source": [
    "# If Vz=10 V, calculate Iz.\n",
    "\n",
    "# Given data\n",
    "\n",
    "Vin = 25.#       # Input voltage=25 Volts\n",
    "Vz = 10.#        # Zener voltage=10 Volts\n",
    "Rs = 1.*10**3#    # Source Resistance=1 kOhms\n",
    "\n",
    "Iz = (Vin-Vz)/Rs#\n",
    "print 'The Zener Current = %0.2f Amps'%Iz\n",
    "print 'i.e 15 mAmps'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 27_12 Page No.  891"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Source Current = 0.075 Amps\n",
      "i.e 75 mAmps\n",
      "The Load Current = 0.03 Amps\n",
      "i.e 30 mAmps\n",
      "The Zener Current = 0.045 Amps\n",
      "i.e 45 mAmps\n",
      "The Power Dissipation of Zener = 0.3375 Watts\n",
      "i.e 337.5 mWatts\n"
     ]
    }
   ],
   "source": [
    "# If R L increases to 250 Ohms, calculate the following: Is, Il, Iz, and Pz.\n",
    "\n",
    "# Given data\n",
    "\n",
    "Vin = 25#       # Input voltage=25 Volts\n",
    "Vz = 7.5#        # Zener voltage=7.5 Volts\n",
    "Rl = 250#    # Load Resistance=250 Ohms\n",
    "Is = 75*10**-3#  # Source current=75 mAmps\n",
    "\n",
    "print 'The Source Current = %0.3f Amps'%Is\n",
    "print 'i.e 75 mAmps'\n",
    "\n",
    "Il = Vz/Rl#\n",
    "print 'The Load Current = %0.2f Amps'%Il\n",
    "print 'i.e 30 mAmps'\n",
    "\n",
    "Iz = Is-Il#\n",
    "print 'The Zener Current = %0.3f Amps'%Iz\n",
    "print 'i.e 45 mAmps'\n",
    "\n",
    "Pz = Vz*Iz#\n",
    "print 'The Power Dissipation of Zener = %0.4f Watts'%Pz\n",
    "print 'i.e 337.5 mWatts'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 27_13 Page No.  892"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Source Current = 0.06 Amps.\n",
      "i.e 60 mAmps\n",
      "The Load Current for 200 ohms Load = 0.05 Amps.\n",
      "i.e 50 mAmps\n",
      "The Zener Current for 200 ohms Load = 0.01 Amps.\n",
      "i.e 10 mAmps\n",
      "The Load Current for 500 ohms Load = 0.02 Amps.\n",
      "i.e 20 mAmps\n",
      "The Zener Current for 500 ohms load = 0.04 Amps.\n",
      "i.e 40 mAmps\n"
     ]
    }
   ],
   "source": [
    "# Calculate Is, Il and Iz for (a)Rl=200 ohms# (b)Rl=500 ohms.\n",
    "\n",
    "# Given data\n",
    "\n",
    "Vin = 16.#       # Vin=16 Volts given\n",
    "Vz = 10.#        # Vz=10 Volts given\n",
    "Rs = 100.#       # Source Resistance = 100 ohms given\n",
    "Rla = 200.#      # Load Resistance A = 200 ohms given\n",
    "Rlb = 500.#      #Load Resistance B = 500 ohms given\n",
    "\n",
    "# For Rl 200 ohms\n",
    "\n",
    "Is = (Vin-Vz)/Rs#\n",
    "print 'The Source Current = %0.2f Amps.'%Is\n",
    "print 'i.e 60 mAmps'\n",
    "\n",
    "Ila = Vz/Rla#\n",
    "print 'The Load Current for 200 ohms Load = %0.2f Amps.'%Ila\n",
    "print 'i.e 50 mAmps'\n",
    "\n",
    "Iza = Is-Ila\n",
    "print 'The Zener Current for 200 ohms Load = %0.2f Amps.'%Iza\n",
    "print 'i.e 10 mAmps'\n",
    "\n",
    "# For Rl 500 ohms\n",
    "\n",
    "Ilb = Vz/Rlb#\n",
    "print 'The Load Current for 500 ohms Load = %0.2f Amps.'%Ilb\n",
    "print 'i.e 20 mAmps'\n",
    "\n",
    "Izb = Is-Ilb\n",
    "print 'The Zener Current for 500 ohms load = %0.2f Amps.'%Izb\n",
    "print 'i.e 40 mAmps'"
   ]
  }
 ],
 "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
}