summaryrefslogtreecommitdiff
path: root/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter09.ipynb
blob: 43811e6a9629914c4a4635b506159e7501e44873 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:2de7fc45fa4af4f15b7c3a8c570a56406c01593cbaa6b905a79129b1b124ba5a"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter09 : Voltage Regulators"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Exa 9.1 : page 380"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given data\n",
      "Iq=5 #in mA\n",
      "Vo=18 #in volts\n",
      "Vreg=15 #in volts\n",
      "R1=Vreg/(10*Iq*10**-3) #in Ohms  Iq must be in Amperes here\n",
      "R2=(Vo-Vreg)/(11*Iq*10**-3) #in Ohms  Iq must be in Amperes here\n",
      "print \"the values of R1 and R2 are : %0.2f  & %0.1f ohms\"%(R1,R2) "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the values of R1 and R2 are : 300.00  & 54.5 ohms\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Exa 9.2 : page 381"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given data\n",
      "Vreg=8 #in volts as IC 7808 is given\n",
      "IL=100 #in mA\n",
      "IR=100 #in mA\n",
      "Iq=0 #in mA\n",
      "RL=50 #in ohms\n",
      "# let find the value of resistor to deliver required current\n",
      "R=Vreg/(IR*10**-3) # in ohms  so current must be in amperes\n",
      "print \"Required Resistance = %0.2f ohms  \"%R \n",
      "Vo = (IR*10**-3)*R+(IL*10**-3)*RL \n",
      "print \"Vo = %0.2f Volts\"%Vo\n",
      "#considering 2 volt dropout\n",
      "Vdropout=2 #in volts\n",
      "VI=Vo+Vdropout \n",
      "print \"Input voltage, VI = %0.2f Volts \"%VI "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Required Resistance = 80.00 ohms  \n",
        "Vo = 13.00 Volts\n",
        "Input voltage, VI = 15.00 Volts \n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Exa 9.3 : page 382"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "#given data\n",
      "RL1=100 #in ohms\n",
      "RL2=8 #in ohms\n",
      "RL3=1 #in ohms\n",
      "VEBon=0.7 #in volts\n",
      "Beta=25 \n",
      "R=5 #in ohms\n",
      "#device used 7808 so V=8 volts\n",
      "V=8 \n",
      "# part(i) for a laod of 100 ohms\n",
      "IL1=V/RL1 #in amperes\n",
      "VacR1=IL1*R \n",
      "print \"Part(i) : \"\n",
      "print \"VacR = %0.2f Volts \"%VacR1\n",
      "print \"  Which is less than the given VEBon. Hence Transistor remains OFF.\"\n",
      "#so Io=IL and Ic=0\n",
      "Io1=IL1 #in amperes \n",
      "Ic1=0 \n",
      "print \"Ic and Io for the 100 ohms load are %0.2f mA & %0.2f Amperes \"%(Io1*1E3,Ic1)\n",
      "# part(ii) for a laod of 8 ohms\n",
      "IL2=V/RL2 #in amperes\n",
      "VacR2=IL2*R \n",
      "print \"Part(ii) : \"\n",
      "print \"The voltage across R will be = %0.2f Volts \"%VacR2\n",
      "print \"Which is greater than the given VEBon.Hence Transistor will be ON.\"\n",
      "#expression for Io\n",
      "Io2=((IL2+(Beta*VEBon)/R))/(Beta+1) #in amperes \n",
      "Ic2=IL2-Io2 \n",
      "print \"Ic and Io for the 8 ohms load are %0.f & %0.f Amperes  \"%(Io2*1e3,Ic2*1e3)\n",
      "\n",
      "# part(iii) for a laod of 1 ohms\n",
      "IL3=V/RL3 #in amperes\n",
      "VacR3=IL3*R \n",
      "print \"Part(iii) : \"\n",
      "print \"VacR = %0.2f Volt \"%VacR3\n",
      "print \"  Which is greater than the given VEBon.Hence Transistor will be ON.\"\n",
      "#expression for Io\n",
      "Io3=((IL3+(Beta*VEBon)/R))/(Beta+1) #in amperes \n",
      "Ic3=IL3-Io3 \n",
      "print \"Ic and Io for the 1 ohms load are %0.f & %0.3f Amperes \"%(Io3*1e3,Ic3)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Part(i) : \n",
        "VacR = 0.40 Volts \n",
        "  Which is less than the given VEBon. Hence Transistor remains OFF.\n",
        "Ic and Io for the 100 ohms load are 80.00 mA & 0.00 Amperes \n",
        "Part(ii) : \n",
        "The voltage across R will be = 5.00 Volts \n",
        "Which is greater than the given VEBon.Hence Transistor will be ON.\n",
        "Ic and Io for the 8 ohms load are 173 & 827 Amperes  \n",
        "Part(iii) : \n",
        "VacR = 40.00 Volt \n",
        "  Which is greater than the given VEBon.Hence Transistor will be ON.\n",
        "Ic and Io for the 1 ohms load are 442 & 7.558 Amperes \n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Exa 9.4 : page 384"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given data\n",
      "#for the given IC LM317: \n",
      "Iadj=100 #in micro amperes\n",
      "Vref=1.25 #in volts\n",
      "R1=240 #in ohms\n",
      "#(i) For Vo=2 volts\n",
      "#on solving equation Vo=Vref(1+R2/R1)+R2*Iadj\n",
      "Vo=2 #in volts\n",
      "R2=(Vo-Vref)/((Vref/R1)+Iadj*10**-6) \n",
      "print \"for Output 2 volts the requires value of resistance R2 = %0.f ohms \"%(R2)\n",
      "#(i) For Vo=12 volts\n",
      "Vo1=12 #in volts\n",
      "#on solving equation Vo=Vref(1+R2/R1)+R2*Iadj\n",
      "R21=(Vo1-Vref)/(Vref/R1+Iadj*10**-6) \n",
      "print \"for Output 12 volts the requires value of resistance R2 = %0.2f kohms\"%(R21/1e3)\n",
      "#use potentiometer for adjustable value\n",
      "print \"Hence use 3kohm potentiometer to set R2.\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "for Output 2 volts the requires value of resistance R2 = 141 ohms \n",
        "for Output 12 volts the requires value of resistance R2 = 2.03 kohms\n",
        "Hence use 3kohm potentiometer to set R2.\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Exa 9.5 : page 385"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given data\n",
      "#for the given IC LM317: \n",
      "Iadj=100 #in micro amperes\n",
      "Vref=1.25 #in volts\n",
      "R1=240 #in ohms\n",
      "#we have output equation Vo=Vref(1+R2/R1)+R2*Iadj\n",
      "R2min=0 #in ohms\n",
      "R2max=3000 #in ohms\n",
      "Vomin=Vref*(1+R2min/R1)+R2min*Iadj*10**-6 #in volts\n",
      "Vomax=Vref*(1+R2max/R1)+R2max*Iadj*10**-6 #in volts\n",
      "print \"Minimum output voltage = %0.2f Volts \"%(Vomin)\n",
      "print \"Maximum output voltage = %0.3f Volts \"%Vomax"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Minimum output voltage = 1.25 Volts \n",
        "Maximum output voltage = 17.175 Volts \n"
       ]
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Exa 9.6 : page 389"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given data\n",
      "#IC 723\n",
      "Vsense=0.7#in volts\n",
      "Vo=5 #in volts\n",
      "Im=50 #in mA\n",
      "Id=1 #in mA\n",
      "Vr=7 #in volts\n",
      "R1=(Vr-Vo)/(Id*10**-3) \n",
      "R2=Vo/(Id*10**-3) \n",
      "R3=(R1*R2)/(R1+R2) \n",
      "Rcl=Vsense/(Im*10**-3) \n",
      "print \"various resistance values for the circuit is as follows : \"\n",
      "print \"R1 = %0.2f kohm\"%(R1/1e3)\n",
      "print \"R2 = %0.2f kohm\"%(R2/1e3)\n",
      "print \"R3 = %0.2f kohm\"%(R3/1e3)\n",
      "print \"Rcl = %0.2f ohm\"%Rcl"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "various resistance values for the circuit is as follows : \n",
        "R1 = 2.00 kohm\n",
        "R2 = 5.00 kohm\n",
        "R3 = 1.43 kohm\n",
        "Rcl = 14.00 ohm\n"
       ]
      }
     ],
     "prompt_number": 24
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Exa 9.7 : page 390"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given data\n",
      "# IC 723\n",
      "Id=1 #in mA\n",
      "Vsense=0.7 #in volts\n",
      "Vo=15 #in volts\n",
      "Im=50 #in mA\n",
      "Vr=7 #in volts\n",
      "R1=(Vo-Vr)/(Id*10**-3) \n",
      "R2=Vr/(Id*10**-3) \n",
      "R3=(R1*R2)/(R1+R2) \n",
      "Rcl=Vsense/(Im*10**-3) \n",
      "print \"various resistance values for the circuit is as follows : \"\n",
      "print \"R1 = %0.2f kohm\"%(R1/1e3)\n",
      "print \"R2 = %0.2f kohm\"%(R2/1e3)\n",
      "print \"R3 = %0.2f kohm\"%(R3/1e3)\n",
      "print \"Rcl = %0.2f ohm\"%Rcl"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "various resistance values for the circuit is as follows : \n",
        "R1 = 8.00 kohm\n",
        "R2 = 7.00 kohm\n",
        "R3 = 3.73 kohm\n",
        "Rcl = 14.00 ohm\n"
       ]
      }
     ],
     "prompt_number": 25
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Exa 9.8 : page 390"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given data\n",
      "Im=100 #in mA\n",
      "Vr=7 #in volts\n",
      "R2=10 #in kohm\n",
      "Vsense=0.7 #in volts\n",
      "#using equation Vo=((R1+R2)/R2)*Vr\n",
      "#for Vo=10 volts assuming R2=10kohm\n",
      "Vo=10 #in volts\n",
      "R1=((Vo*R2)/Vr)-R2#it gives 3R2=7R1 \n",
      "print \"Part(i) : \"\n",
      "print \"Value of resistance R1 = %0.2F kohms \"%R1\n",
      "#now let output voltage is 15 volts\n",
      "Vo=15 #in volts\n",
      "R1=((Vo*R2)/Vr)-R2#it gives 3R2=7R1 \n",
      "print \"Part(ii) : \"\n",
      "print \"Value of resistance R1 = %0.2f kohms\"%R1\n",
      "R3=(R1*R2)/(R1+R2) \n",
      "print \"value of resistance R3 = %0.2f kohms\"%R3\n",
      "Rcl=Vsense/(Im*10**-3) #in ohms\n",
      "print \"Value of Rcl = %0.2f ohms\" %Rcl"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Part(i) : \n",
        "Value of resistance R1 = 4.29 kohms \n",
        "Part(ii) : \n",
        "Value of resistance R1 = 11.43 kohms\n",
        "value of resistance R3 = 5.33 kohms\n",
        "Value of Rcl = 7.00 ohms\n"
       ]
      }
     ],
     "prompt_number": 29
    }
   ],
   "metadata": {}
  }
 ]
}