summaryrefslogtreecommitdiff
path: root/Electronic_Devices_/Chapter17.ipynb
blob: 6e48c896b7d6c317b4c2d3e67fba551d14382613 (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
{
 "metadata": {
  "name": "Chapter_17"
 }, 
 "nbformat": 2, 
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "markdown", 
     "source": [
      "<h1>Chapter 17: Voltage Regulators<h1>"
     ]
    }, 
    {
     "cell_type": "markdown", 
     "source": [
      "<h3>Example 17.1, Page Number:552 <h3>"
     ]
    }, 
    {
     "cell_type": "code", 
     "collapsed": false, 
     "input": [
      "%pylab inline"
     ], 
     "language": "python", 
     "outputs": [
      {
       "output_type": "stream", 
       "stream": "stdout", 
       "text": [
        "", 
        "Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].", 
        "For more information, type 'help(pylab)'."
       ]
      }
     ], 
     "prompt_number": 1
    }, 
    {
     "cell_type": "code", 
     "collapsed": false, 
     "input": [
      "", 
      "#variable declaration", 
      "Del_V_out=0.25;", 
      "V_out=15;", 
      "Del_V_in=5;    #All voltages in Volts", 
      "", 
      "#Calculations", 
      "line_regulation=((Del_V_out/V_out)/Del_V_in)*100;", 
      "", 
      "#Result", 
      "print('line regulation in %%V is %f' %line_regulation)"
     ], 
     "language": "python", 
     "outputs": [
      {
       "output_type": "stream", 
       "stream": "stdout", 
       "text": [
        "line regulation in %V is 0.333333"
       ]
      }
     ], 
     "prompt_number": 2
    }, 
    {
     "cell_type": "markdown", 
     "source": [
      "<h3>Example 17.2, Page Number: 553<h3>"
     ]
    }, 
    {
     "cell_type": "code", 
     "collapsed": false, 
     "input": [
      "", 
      "# Variable Declaration", 
      "V_NL=12.0;    #No load output voltage in Volts", 
      "V_FL=11.9;  #Full load output voltage in Volts", 
      "I_F=10.0;     #Full load current in milli-Amperes", 
      "", 
      "#Calculations", 
      "load_regulation=((V_NL-V_FL)/V_FL)*100;", 
      "load_reg=load_regulation/I_F;", 
      "", 
      "#Result", 
      "print('load regulation as percentage change from no load to full load = %f'%load_regulation)", 
      "print('\\nload regulation as percentage change per milliampere = %f' %load_reg)"
     ], 
     "language": "python", 
     "outputs": [
      {
       "output_type": "stream", 
       "stream": "stdout", 
       "text": [
        "load regulation as percentage change from no load to full load = 0.840336", 
        "", 
        "load regulation as percentage change per milliampere = 0.084034"
       ]
      }
     ], 
     "prompt_number": 3
    }, 
    {
     "cell_type": "markdown", 
     "source": [
      "<h3>Example 17.3, Page Number: 556<h3>"
     ]
    }, 
    {
     "cell_type": "code", 
     "collapsed": false, 
     "input": [
      "", 
      "", 
      "V_REF=5.1    #Zener voltage in volts", 
      "R2=10*10**3;", 
      "R3=10*10**3; #resistances in ohm", 
      "V_out=(1+(R2/R3))*V_REF;", 
      "print('output voltage in volts = %.1f'%V_out)"
     ], 
     "language": "python", 
     "outputs": [
      {
       "output_type": "stream", 
       "stream": "stdout", 
       "text": [
        "output voltage in volts = 10.2"
       ]
      }
     ], 
     "prompt_number": 4
    }, 
    {
     "cell_type": "markdown", 
     "source": [
      "<h3>Example 17.4, Page Number: 557<h3>"
     ]
    }, 
    {
     "cell_type": "code", 
     "collapsed": false, 
     "input": [
      "", 
      "R4=1;    #Resistance in Ohms", 
      "I_L_max=0.7/R4;", 
      "print('maximum current provided to load(in amperes) = %.1f'%I_L_max)"
     ], 
     "language": "python", 
     "outputs": [
      {
       "output_type": "stream", 
       "stream": "stdout", 
       "text": [
        "maximum current provided to load(in amperes) = 0.7"
       ]
      }
     ], 
     "prompt_number": 5
    }, 
    {
     "cell_type": "markdown", 
     "source": [
      "<h3>Example 17.5, Page Number: 560<h3>"
     ]
    }, 
    {
     "cell_type": "code", 
     "collapsed": false, 
     "input": [
      "", 
      "V_IN=12.5;    #maximum input voltage in volts", 
      "R1=22;    #In Ohms", 
      "#Worst case of power dissipation is when V_OUT=0V", 
      "V_OUT=0;", 
      "V_R1=V_IN-V_OUT;   #Voltage across R1", 
      "P_R1=(V_R1*V_R1)/R1;    #maximum power dissipated by R1", 
      "print('maximum power dissipated by R1 in WATTS = %f'%P_R1)"
     ], 
     "language": "python", 
     "outputs": [
      {
       "output_type": "stream", 
       "stream": "stdout", 
       "text": [
        "maximum power dissipated by R1 in WATTS = 7.102273"
       ]
      }
     ], 
     "prompt_number": 6
    }, 
    {
     "cell_type": "markdown", 
     "source": [
      "<h3>Example 17.6, Page Number: 569<h3>"
     ]
    }, 
    {
     "cell_type": "code", 
     "collapsed": false, 
     "input": [
      "", 
      "print('SAME AS EX-2.8 in CHAPTER-2')"
     ], 
     "language": "python", 
     "outputs": [
      {
       "output_type": "stream", 
       "stream": "stdout", 
       "text": [
        "SAME AS EX-2.8 in CHAPTER-2"
       ]
      }
     ], 
     "prompt_number": 7
    }, 
    {
     "cell_type": "markdown", 
     "source": [
      "<h3>Example 17.7, Page Number: 572<h3>"
     ]
    }, 
    {
     "cell_type": "code", 
     "collapsed": false, 
     "input": [
      "", 
      "I_max=700*10**-3;    #in Amperes", 
      "R_ext=0.7/I_max;", 
      "print('value of resistor in Ohms for which max current is 700mA = %f'%R_ext)"
     ], 
     "language": "python", 
     "outputs": [
      {
       "output_type": "stream", 
       "stream": "stdout", 
       "text": [
        "value of resistor in Ohms for which max current is 700mA = 1.000000"
       ]
      }
     ], 
     "prompt_number": 8
    }, 
    {
     "cell_type": "markdown", 
     "source": [
      "<h3>Example 17.8, Page Number: 572<h3>"
     ]
    }, 
    {
     "cell_type": "code", 
     "collapsed": false, 
     "input": [
      "", 
      "V_OUT=24.0;    #Output voltage in Volts", 
      "R_L=10.0;    #Load resistance in Ohms", 
      "V_IN=30.0;    #Input voltage in Volts", 
      "I_max=700.0*10**-3;   #maximum interal current in Amperes", 
      "I_L=V_OUT/R_L;    #load current in amperes", 
      "I_ext=I_L-I_max;    #current through the external pass transistor in Amperes", 
      "P_ext_Qext=I_ext*(V_IN-V_OUT);    #power dissipated", 
      "print('power dissiated(in WATTS) by the external pass transistor = %.1f'%P_ext_Qext)", 
      "print('\\nFor safety purpose, we choose a power transistor with rating more than this, say 15W')"
     ], 
     "language": "python", 
     "outputs": [
      {
       "output_type": "stream", 
       "stream": "stdout", 
       "text": [
        "power dissiated(in WATTS) by the external pass transistor = 10.2", 
        "", 
        "For safety purpose, we choose a power transistor with rating more than this, say 15W"
       ]
      }
     ], 
     "prompt_number": 9
    }, 
    {
     "cell_type": "markdown", 
     "source": [
      "<h3>Example 17.9, Page Number: 574<h3>"
     ]
    }, 
    {
     "cell_type": "code", 
     "collapsed": false, 
     "input": [
      "", 
      "V_out=5.0;    #7805 gives output voltage of 5V", 
      "I_L=1.0;    #constant current of 1A", 
      "R1=V_out/I_L;", 
      "print('The value of current-setting resistor in ohms = %d'%R1)"
     ], 
     "language": "python", 
     "outputs": [
      {
       "output_type": "stream", 
       "stream": "stdout", 
       "text": [
        "The value of current-setting resistor in ohms = 5"
       ]
      }
     ], 
     "prompt_number": 10
    }
   ]
  }
 ]
}