summaryrefslogtreecommitdiff
path: root/Operational_Amplifiers_and_Linear_Integrated_Circuit/C3_1.ipynb
blob: e799a9b7ed93dd76d918a19205177bd665baf424 (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
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 3: Inverting and Non Inverting Amplifiers"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.1 Page No 47"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "Rf=100*(10**3)      #Feedback Resistance in ohms\n",
      "Ri=10*(10**3)       #Input Resistance in ohms\n",
      "Ei=1.0                #Input volts\n",
      "\n",
      "#Calculation \n",
      "I=Ei/Ri              #Equation for current through Rf\n",
      "Vout=-(Rf/Ri)*Ei      #Equation for Output Voltage\n",
      "Acl=-(Rf/Ri)          #Closed loop gain of the amplifier \n",
      "\n",
      "#Result\n",
      "print\"(a) Current through Rf  is\",I*1000,\"mA\"\n",
      "print\"(b) Value of output voltage is \",Vout,\"V\"\n",
      "print\"(c) Value of closed loop gain is\",Acl"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) Current through Rf  is 0.1 mA\n",
        "(b) Value of output voltage is  -10.0 V\n",
        "(c) Value of closed loop gain is -10\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.2 Page No 47"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "Vout=10.0         #output voltage\n",
      "I=0.1*(10**-3)   #current through Rf in amperes\n",
      "Rl=25*(10**3)    #Load resistance in ohms\n",
      "\n",
      "#Calculation\n",
      "Il=Vout/Rl\n",
      "Iout=I+Il\n",
      "\n",
      "#Result\n",
      "print\"(a) Value of load current is\",Il*1000,\"m\"\n",
      "print\"(b) Total current into the output pin of the opamp is \",Iout*1000,\"mA\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) Value of load current is 0.4 m\n",
        "(b) Total current into the output pin of the opamp is  0.5 mA\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.3 Page No 49"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "Rf=250*(10**3)#Feedback Resistance in Ohms\n",
      "Ri=10*(10**3)#Input Resistance in Ohms\n",
      "Ei=0.5#Input voltage\n",
      "\n",
      "#Calculation\n",
      "I=Ei/(Ri)\n",
      "VRf=I*Rf\n",
      "Ei1=-0.5\n",
      "Vout=-(Rf/Ri)*Ei1\n",
      "\n",
      "#Result\n",
      "print\"(a) Value of current through Rf is\",I,\"A\"\n",
      "print\"(b) Voltage through Rf is \",VRf,\"V\"\n",
      "print\"(c) Output Voltage is\",Vout,\"V\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) Value of current through Rf is 5e-05 A\n",
        "(b) Voltage through Rf is  12.5 V\n",
        "(c) Output Voltage is 12.5 V\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.4 Page No 49"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "Vout=12.5      #in volts\n",
      "Il=2*10**-3    #in amperes\n",
      "\n",
      "#Calculation\n",
      "Rl=Vout/Il     #Load resistance in ohm\n",
      "I=0.05*10**-3\n",
      "Iout=I+Il\n",
      "\n",
      "#Result\n",
      "print\"(a) Value of Load Resistance is\",Rl/1000,\"kohm\"\n",
      "print\"(b) Value of output current is \",Iout*1000,\"mA\"\n",
      "print\"(c)The circuit input resistance is Rl=10Kohm\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) Value of Load Resistance is 6.25 kohm\n",
        "(b) Value of output current is  2.05 mA\n",
        "(c)The circuit input resistance is Rl=10Kohm\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.5 Page No 50"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "Rf=20*10**3\n",
      "Ri=10*10**3\n",
      "\n",
      "#calculation\n",
      "Acl=-(Rf/Ri)  #Voltage Gain\n",
      "\n",
      "#Result\n",
      "print\" Value of Voltage Gain is\",Acl"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Value of Voltage Gain is -2\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.6 Page No 51"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "Ei=-5         #input voltage\n",
      "Acl=-2        #Voltage Gain\n",
      "\n",
      "#Calculation\n",
      "Vout=Ei*Acl   #output voltage\n",
      "\n",
      "#Result\n",
      "print\" Value of Output Voltage is\",Vout,\"V\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Value of Output Voltage is 10 V\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.7 Page No :51"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "Ri=10*10**3       #input resistance in ohm\n",
      "Gain= 25\n",
      "\n",
      "#Calculation\n",
      "Rf=Gain*Ri        #feedback resistance in ohm\n",
      "\n",
      "#result\n",
      "print\" Value of Rf is\",Rf/1000,\"kohm\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Value of Rf is 250 kohm\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.8 Page No 52"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "E1=2\n",
      "E2=3\n",
      "E3=1        #input voltage\n",
      "R=10*10**3  #in ohm\n",
      "\n",
      "#calculation\n",
      "Vout=-(E1+E2+E3)\n",
      "\n",
      "#result\n",
      "print\" Value of o/p voltage is  \",Vout,\"V\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Value of o/p voltage is   -6 V\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.9 Page No 53"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "E1=2.0\n",
      "E2=3.0\n",
      "E3=-1.0      #input voltage\n",
      "R=10*10**3   #in ohm\n",
      "\n",
      "#Calculation\n",
      "Vout=-(E1+E2+E3)\n",
      "\n",
      "#result\n",
      "print\" Value of o/p voltage is\",Vout"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Value of o/p voltage is -4.0\n"
       ]
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.11 Page No 56"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "#Channel 1\n",
      "Ri= 10*10**3      #Choosing Input resistance\n",
      "Acl = -10.0 \n",
      "\n",
      "#Calculation\n",
      "Rf1 = - (Acl * Ri)\n",
      "#Channel 2\n",
      "Acl1 = -5\n",
      "Rf2 = - (Acl1 * Ri)\n",
      "#channel 3\n",
      "Acl2 = -2\n",
      "Rf3 = - (Acl2 * Ri)\n",
      "\n",
      "#result\n",
      "print\" Value of Rf1 =  \",Rf1/1000,\"kohm\"\n",
      "print\" Value of Rf2 =  \",Rf2/1000,\"kohm\"\n",
      "print\" Value of Rf3 =  \",Rf3/1000,\"kohm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Value of Rf1 =   100.0 kohm\n",
        " Value of Rf2 =   50 kohm\n",
        " Value of Rf3 =   20 kohm\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.12 Page No 57"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "R1=100000.0\n",
      "R2=100000.0\n",
      "R3=100000.0\n",
      "R=100000.0     #in ohm\n",
      "Rf=33*10**3    #in ohm\n",
      "E1=5\n",
      "E2=5\n",
      "E3=-1  #in volts\n",
      "n=3.0          #number of inputs\n",
      "\n",
      "#Calculation\n",
      "Vout=-(E1+E2+E3)/n   #output voltage\n",
      "\n",
      "#Result\n",
      "print\" Value of output voltage is\",Vout,\"V\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Value of output voltage is -3.0 V\n"
       ]
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.13 Page No 59"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "Rf = 40*10**3\n",
      "R1 = 10*10**3\n",
      "\n",
      "#calculation\n",
      "Acl = (Rf + R1)/R1\n",
      "print\"(a) Value of Voltage Gain =   \",Acl\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) Value of Voltage Gain =    5\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.14 Page No 59"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given \n",
      "Acl = 10.0    # Gain is positive, so choose noninvering amplifier\n",
      "R1 = 10*10**3\n",
      "\n",
      "#Calculation\n",
      "Rf = (Acl*R1)-R1\n",
      "\n",
      "#Result\n",
      "print\" Value of Rf is\",Rf/1000,\"kohm\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": []
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.15 Page No 62"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "Ei=4.0       #in volts\n",
      "Rl=10*10**3  #in ohm\n",
      "I=0          #in ampere\n",
      "\n",
      "#Calculation\n",
      "Vout=Ei      #output voltage\n",
      "Il=Vout/Rl   #load current\n",
      "I0=I+Il      #output current \n",
      "\n",
      "#Result\n",
      "print\" Value of o/p voltage is\",Vout,\"V\"\n",
      "print\" Value of load current is \",Il*1000,\"mA\"\n",
      "print\" Value of output current is \",I0*1000,\"mA\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Value of o/p voltage is 4.0 V\n",
        " Value of load current is  0.4 mA\n",
        " Value of output current is  0.4 mA\n"
       ]
      }
     ],
     "prompt_number": 11
    }
   ],
   "metadata": {}
  }
 ]
}