summaryrefslogtreecommitdiff
path: root/Electronics_Devices_And_Circuits/chapter8.ipynb
blob: 326b2cab71a1dc3332a4acf770203567c4bcb5cd (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:7039c5014fcc7b7ac57b07f9ca218d5a9c1cf6429694e23e4e8bce3552a45c07"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 8:Multivibrators And Switching Regulators"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.1,Page number 426"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "C=0.1                      #capacitance(uF)\n",
      "R1=10                      #resistance(k ohms)\n",
      "R2=2.3                     #resistance(k ohms)\n",
      "Vcc=12.                    #supply voltage(V) \n",
      "Rl=10**3.                  #resistance(k ohms)\n",
      "\n",
      "#Calculations\n",
      "#Part a\n",
      "f=1/(0.693*C*(R2+R1/2))    #frequency(Hz)\n",
      "\n",
      "#Part b\n",
      "D=(1+(R2/R1))/(1+2*(R2/R1))*100          #duty cycle\n",
      " \n",
      "#Part c\n",
      "#(i)\n",
      "T1=0.693*C*(R1+R2)                        #time period through R1(ms)\n",
      "T2=0.693*R2*C                             #time period through R2(ms)\n",
      "Pavg=(Vcc/Rl)**2*(T1/(T1+T2))             #average power dissipated during current sourcing(mW)\n",
      "\n",
      "#Part d\n",
      "Pavg1=(T2/(T1+T2))*(Vcc/Rl)**2           #average power dissipated during current sinking(mW)\n",
      "\n",
      "#Results\n",
      "print\"print\",round(f,2),\"kHz\"\n",
      "print\"duty cycle is\",round(D,2),\"%\"\n",
      "print\"average power dissipated in current sourcing is\",round((Pavg/1E-3),3),\"mW\"\n",
      "print\"average power dissipated in current sinking is\",round(Pavg1/1e-3,3),\"mW\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "print 1.98 kHz\n",
        "duty cycle is 84.25 %\n",
        "average power dissipated in current sourcing is 0.121 mW\n",
        "average power dissipated in current sinking is 0.023 mW\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.2,Page number 426"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "#Variable declaration\n",
      "t=1                               #time constant\n",
      "e=1.8                             #e=R1/R2 min=1.8\n",
      "e1=9.                              #e1=R1/R2 max=9\n",
      "\n",
      "#Calculations\n",
      "Betamin=1/(1+e)                 #current gain minimum\n",
      "Betamax=1/(1+e1)                #current gain maximum\n",
      "Tmax=2*t*math.log((1+Betamin)/(1-Betamin))          \n",
      "Tmin=2*t*math.log((1+Betamax)/(1-Betamax))                 \n",
      "fmin=1/Tmax                     #minimum freq(Hz)\n",
      "fmax=1/Tmin                     #maximum freq(k Hz)\n",
      "\n",
      "#Results\n",
      "print\"fmin is\",round(fmin/1E-3),\"Hz and fmax is\",round(fmax,1),\"KHz\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "fmin is 669.0 Hz and fmax is 2.5 KHz\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.3,Page number 427"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "C=0.01                     #capacitance(uF)\n",
      "R2=15                      #resistance(k ohms)\n",
      "Va2=4                      #voltage(V)\n",
      "Vcc=15.                    #supply voltage(V)\n",
      "R1=33                      #resistance(k ohms)\n",
      "\n",
      "#Calculations\n",
      "Va1=0.67*Vcc               #voltage(V)\n",
      "Vamax=Va1+Va2              #Va maximum(V)\n",
      "Vamin=Va1-Va2              #Va minimum(V)\n",
      "T1max=C*(R1+R2)*(math.log((1-(Vamax/(2*Vcc)))/(1-(Vamax/Vcc))))   #time period(ms)\n",
      "T1min=C*(R1+R2)*(math.log((1-(Vamin/(2*Vcc)))/(1-(Vamin/Vcc))))   #time period(ms)\n",
      "T2=0.693*R2*C\n",
      "fmax=1/(T1min+T2)                    #maximum frequency(K Hz)\n",
      "fmin=1/(T1max+T2)                    #miniimum frequency(K Hz)\n",
      "\n",
      "#Results\n",
      "print\"minimum freq is\",round(fmin,2),\"(solution given in the textbook is incorrect)\"\n",
      "print\"maximum freq is\",round(fmax,2),\"(solution given in the textbook is incorrect)\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "minimum freq is 0.89 (solution given in the textbook is incorrect)\n",
        "maximum freq is 4.1 (solution given in the textbook is incorrect)\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.4,Page number 433"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "Vi=25                         #input voltage(V) \n",
      "Vsmax=30                      #supply voltage max(V)\n",
      "Vomin=Vl=12                   #output minimum voltage or load voltage(V)\n",
      "R1=20                         #load voltage(V)\n",
      "Io=15.                        #output current(mA) \n",
      "Iq=3.                         #quinscent current of regulator(mA)\n",
      "Vo=20.                        #output voltage(V)\n",
      "\n",
      "#Calculations\n",
      "#Part a\n",
      "#(i)\n",
      "Vimax=Vsmax                     #maximum permissible voltage(V)\n",
      "Ro=0                            #for Vomin=beta=0\n",
      "#(ii)\n",
      "Vomax=Vi-2\n",
      "betaVomax=Vomax-Vomin                   #output voltage(V)\n",
      "R2max=(R1*betaVomax)/(Vomax-betaVomax)  #R2max(k ohms)\n",
      "#(iii)\n",
      "R3=betaVomax/Io                         #R3(k ohms)\n",
      "\n",
      "#Part b\n",
      "Vt=(Iq*betaVomax)/Io                   #common terminal fall(V)\n",
      "Vomin1=Vl+Vt                           #voltage output minimum(V)\n",
      "\n",
      "#Part c\n",
      "betaVo=Vo-Vl                          #output voltage(V)\n",
      "beta=betaVo/Vo                        #current gain\n",
      "R2=(R1*betaVo)/(Vo-betaVo)            #R2(ohms)\n",
      "\n",
      "#Results\n",
      "print\"a)i)max permissible supply voltage is\",Vimax,\"V\"\n",
      "print\"ii)output voltage range for Vi=25V is\",Vomin,\"V to\",Vomax,\"V and R2max is\",R2max,\"k ohms\"\n",
      "print\"iii)R3 is\",round(R3,2),\"kohms\"\n",
      "print\"b)Vomin is\",Vomin1,\"V\"\n",
      "print\"c)R2 is\",round(R2,2),\"ohms and R3 is\",round(R3,3),\"ohms\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "a)i)max permissible supply voltage is 30 V\n",
        "ii)output voltage range for Vi=25V is 12 V to 23 V and R2max is 18 k ohms\n",
        "iii)R3 is 0.73 kohms\n",
        "b)Vomin is 14.2 V\n",
        "c)R2 is 13.33 ohms and R3 is 0.733 ohms\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.5,Page number 434"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "A=.0025                     #voltage gain\n",
      "Vi=8                        #input voltage(V)\n",
      "R2=1.5                      #resistance 2(k ohms)\n",
      "R1=1                        #resistance 1(k ohms)\n",
      "Vl=5                        #load voltage(V)\n",
      "\n",
      "#Calculations\n",
      "beta=R2/(R1+R2)               #current gain\n",
      "Vo=Vl/(1-beta)                #output voltage(V)\n",
      "Vo1=(A*Vi)/(1+(A*beta)-beta)  #output voltage ripple if Vi=8Vp-p\n",
      "\n",
      "#Results\n",
      "print\"Vo is\",Vo,\"V\"\n",
      "print\"expression of output voltage ripple\",round(Vo1,2),\"Vp-p\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Vo is 12.5 V\n",
        "expression of output voltage ripple 0.05 Vp-p\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.6,Page number 435"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "Ro=7.5                               #output resistance(ohms)\n",
      "hfe=50                          \n",
      "Ve=20                                #voltage given to emitter(V)       \n",
      "Vbe=0.8                              #base to emitter voltage(V)\n",
      "Vc=15                                #collector voltage(V)\n",
      "P=12                                 #maximum power dissipation(W)\n",
      "Ib1=5                                #for minimum load current Il=0,Ib=5\n",
      "\n",
      "#Calculations\n",
      "Io=(Vc/Ro)*10**3                      #output current(A)\n",
      "Il=76                                 #load current(mA)\n",
      "Is=Il+5                               #supply current(mA)\n",
      "Ic=Io-Is                              #collector current(A)\n",
      "Ib=Ic/hfe                             #base current(mA)\n",
      "Ie=Ic-Ib                              #emitter current(mA)\n",
      "Pt=(Ve*Ie)-(Vc*Ic)                    #power dissipated in transistor(W) \n",
      "Pl=(Ve-Vbe)*Is-Vc*Il                   #power dissipated in LR\n",
      "Vimax=(P+Vc*(Ic*10**-3))/(Ie*10**-3)  #input voltage maximum\n",
      "Iomin=hfe*Ib1                         #output current minimum(mA)\n",
      "\n",
      "#Results\n",
      "print\"power dissipated in the transistor is\",round((Pt/1E+3),2),\"W and in LR is\",round((Pl/1E+3),3),\"W\"\n",
      "print\"maximum permissible input voltage is\",round(Vimax,2),\"V\"\n",
      "print\"minimum load current for load voltage to remain stabalized is\",Iomin,\"mA\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "power dissipated in the transistor is 8.83 W and in LR is 0.415 W\n",
        "maximum permissible input voltage is 21.69 V\n",
        "minimum load current for load voltage to remain stabalized is 250 mA\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.7,Page number 440"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "VL=12            #load voltage(V)\n",
      "I=2.             #current at 12 V\n",
      "V=240            #dc source(V)\n",
      "d=17/50.         #duty cycle\n",
      "d1=0.6           #duty cycle\n",
      "eta1=0.8         #efficiency\n",
      "\n",
      "#Calculations\n",
      "P=VL*I                        #average load power(W)\n",
      "Isav=(1*d)/2                  #average supply current(A)\n",
      "Pav=V*Isav                    #average supply power(W)\n",
      "eta=(P/Pav)*100               #regulator efficiency\n",
      "Isav1=(1*d1)/2                #average supply current(A)\n",
      "Il=(eta1*V*Isav1)/Vdc         #load current(A)\n",
      "Po=Il*Vdc                     #power output(W)\n",
      "\n",
      "#Results\n",
      "print\"regulator efficiency is\",round(eta,1),\"%\"\n",
      "print\"average supply current is\",Il,\"A\"\n",
      "print\"power output is\",Po,\"W\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "regulator efficiency is 58.8 %\n",
        "average supply current is 4.8 A\n",
        "power output is 57.6 W\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.8,Page number 441"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "Vs=200                #dc source voltage(V)\n",
      "Il=5                  #current to load voltage(A)\n",
      "Vl=15                 #load voltage(V)\n",
      "eta=.85               #efficiency\n",
      "f=20                  #oscillator frequency(Hz)\n",
      "iSmax=2.6             #peak value of supply current(A)\n",
      "P=100                 #full load power supply(W)\n",
      "pdf=0.4               #pulse duty factor\n",
      "\n",
      "#Calculations\n",
      "Isav=(Vl*Il)/(Vs*eta)   #average peak supply current(A)\n",
      "iS=(2*Isav)/pdf         #supply current(A)\n",
      "T=1000/f                #oscillation time period(uS)\n",
      "tp=pdf*T                #transistor time(us)\n",
      "d=iS/tp                 #change in iS with respect to time(A/us)\n",
      "tp1=iSmax/d             #transistor time(us)\n",
      "pdf1=tp1/T              #pulse duty factor\n",
      "Isav1=(iSmax*pdf1)/2    #average peak supply current(A)\n",
      "eta1=(P*100)/(Vs*Isav1) #efficiency\n",
      "\n",
      "#Results\n",
      "print\"peak value of supply current is\",round(Isav,3),\"A\"\n",
      "print\"pdf is\",round(pdf,3)\n",
      "print\"overall efficienc is\",round(eta1,1),\"%\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "peak value of supply current is 0.441 A\n",
        "pdf is 0.4\n",
        "overall efficienc is 81.6 %\n"
       ]
      }
     ],
     "prompt_number": 3
    }
   ],
   "metadata": {}
  }
 ]
}