summaryrefslogtreecommitdiff
path: root/Linear_Integrated_Circuit_by_M._S._Sivakumar/Ch14_1.ipynb
blob: b66475f7d790511e777a174f2337c8d15be0c32f (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
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 14 Special Function ICs"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 14.1 Pg 415"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "the output voltage of the adjustable voltage regulator is = 22.25  V \n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "\n",
    "# to determine the regulated voltage \n",
    "R1 = 250 # #ohm \n",
    "R2 = 2500 # # ohm \n",
    "Vref = 2 # #V #reference voltage\n",
    "Iadj = 100*10**-6# # A  # adjacent current\n",
    "\n",
    "#the output voltage of the adjustable voltage regulator is defined by\n",
    "Vo = (Vref*((R2/R1)+1)+(Iadj*R2)) #\n",
    "print 'the output voltage of the adjustable voltage regulator is = %0.2f'%Vo,' V '"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 14.2 Pg 416"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "the total power dissipation of the IC is = 25.00  mA \n"
     ]
    }
   ],
   "source": [
    "# to determine the current drawn from the dual power supply \n",
    "V = 10 #  # V\n",
    "P = 500 # # mW\n",
    "\n",
    "# we assume that  each power supply provides half power supply to IC\n",
    "P1 = (P/2)#\n",
    "\n",
    "# the total power dissipation of the IC\n",
    "# P1 = V*I #\n",
    "I = P1/V #\n",
    "print 'the total power dissipation of the IC is = %0.2f'%I,' mA '"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 14.3 Pg 416"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "the output voltage of the adjustable voltage regulator is = 7.50  V \n"
     ]
    }
   ],
   "source": [
    "# to determine the output voltage \n",
    "R1 = 100*10**3 # #ohm \n",
    "R2 = 500*10**3 # # ohm \n",
    "Vref = 1.25 # #V #reference voltage\n",
    "\n",
    "#the output voltage of the adjustable voltage regulator is defined by\n",
    "Vo = Vref*(R1+R2)/R1#\n",
    "print 'the output voltage of the adjustable voltage regulator is = %0.2f'%Vo,' V '"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 14.4 Pg 417"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The output voltage of switching regulator circuit is = 3.50  V \n"
     ]
    }
   ],
   "source": [
    "# determine the output voltage of the switching regulator circuit\n",
    "d = 0.7 #  # duty cycle\n",
    "Vin = 5 # # V # input voltage\n",
    "\n",
    "# The output voltage of switching regulator circuit is given by\n",
    "Vo = d*Vin #\n",
    "print 'The output voltage of switching regulator circuit is = %0.2f'%Vo,' V '"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 14.5 Pg 417"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The output voltage of switching regulator circuit is = 0.96   \n"
     ]
    }
   ],
   "source": [
    "# determine the duty cycle of the switching regulator circuit\n",
    "Vo = 4.8 # # V # output voltage\n",
    "Vin = 5 # # V # input voltage\n",
    "\n",
    "# The output voltage of switching regulator circuit is given by\n",
    "# Vo = d*Vin #\n",
    "\n",
    "# Duty cycle is given as\n",
    "d =Vo/Vin #\n",
    "print 'The output voltage of switching regulator circuit is = %0.2f'%d,'  '"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 14.6 Pg 418"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The output voltage of switching regulator circuit is = 0.50   \n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "# determine the duty cycle of the switching regulator circuit\n",
    "T =120 # #msec # total pulse time\n",
    "# T = ton + toff #\n",
    "ton = T/2 #\n",
    "\n",
    "# The duty cycle of switching regulator circuit is given by\n",
    "d = ton/T#\n",
    "print 'The output voltage of switching regulator circuit is = %0.2f'%d,'  '"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 14.7 Pg 418"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The output voltage of switching regulator circuit is = 0.67   \n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "# determine the duty cycle of the switching regulator circuit\n",
    "ton = 12 # #msec # on time of pulse\n",
    "# ton = 2*toff #  given\n",
    "# T = ton + toff #\n",
    "toff = ton/2 #\n",
    "T = ton+toff #  # total time\n",
    "\n",
    "# The duty cycle of switching regulator circuit is given by\n",
    "d = ton/T#\n",
    "print 'The output voltage of switching regulator circuit is = %0.2f'%d,'  '"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 14.8 Pg 419"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The emitter bias voltage is = 3.80  V \n",
      "The output voltage of the IC LM380 is = 7.90  V \n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "# determine the output voltage of the audio power amplifier IC LM380\n",
    "Vcc = 12 # # V\n",
    "Ic3 = 12*10**-6 #  # A  # collector current of the transistor Q3\n",
    "Ic4 = 12*10**-6 #  # A  # collector current of the transistor Q4\n",
    "R11 = 25*10**3 # # ohm\n",
    "R12 = 25*10**3 #  # ohm\n",
    "\n",
    "# the collector current of Q3 is defined as\n",
    " # Ic3 = (Vcc-3*Veb)/(R11+R12)#\n",
    "Veb = (Vcc-(R11+R12)*Ic3)/3 #\n",
    "print 'The emitter bias voltage is = %0.2f'%Veb,' V '\n",
    "\n",
    "# the output voltage of the IC LM380\n",
    "Vo = (1/2)*Vcc+(1/2)*Veb#\n",
    "print 'The output voltage of the IC LM380 is = %0.2f'%Vo,' V '"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 14.9 Pg 420"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The emitter bias voltage is = 3.33  V \n",
      "The output voltage of the IC LM380 is = 6.67  V \n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "# determine the output voltage of the audio power amplifier IC LM380\n",
    "Vcc = 10 # # V\n",
    "Ic3 = 0.01*10**-6 #  # A  # collector current of the transistor Q3\n",
    "Ic4 = 0.01*10**-6 #  # A  # collector current of the transistor Q4\n",
    "R11 = 25*10**3 # # ohm\n",
    "R12 = 25*10**3 #  # ohm\n",
    "\n",
    "# the collector current of Q3 is defined as\n",
    " # Ic3 = (Vcc-3*Veb)/(R11+R12)#\n",
    "Veb = (Vcc-(R11+R12)*Ic3)/3 #\n",
    "print 'The emitter bias voltage is = %0.2f'%Veb,' V '\n",
    "\n",
    "# the output voltage of the IC LM380\n",
    "Vo = (1/2)*Vcc+(1/2)*Veb#\n",
    "print 'The output voltage of the IC LM380 is = %0.2f'%Vo,' V '"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 14.10 Pg 421"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The emitter resistor of Q3 is = 52.00  ohm ( at temperature 25 degree celsius) \n",
      "The trans conductance of transistor is = 38.5  mA/V \n",
      "The base emitter resistor rbe is = 1.30  K ohm \n",
      "The emitter capacitor Ce = 7.65  pF \n",
      "The value of resistance RL is = 264.55  ohm \n",
      "The pole frequency fa is = 601.91  M Hz \n",
      "The pole frequency fb is = 1073.74  M Hz \n",
      "The pole frequency fc is = 3060.67  M Hz \n",
      "Hence fa is a dominant pole frequency \n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "from numpy import inf\n",
    "from math import sqrt, pi\n",
    "# Design a video amplifier of IC 1550 circuit\n",
    "Vcc = 12 # # V\n",
    "Av = -10 #\n",
    "Vagc = 0 # # at bandwidth of 20 MHz\n",
    "hfe = 50 # # forward emitter parameter\n",
    "rbb = 25 #  # ohm  # base resistor\n",
    "Cs = 1*10**-12 #  # F  # source capacitor\n",
    "Cl = 1*10**-12 #  # F  # load capacitor\n",
    "Ie1 = 1*10**-3 # # A # emitter current of Q1\n",
    "f = 1000*10**6 # # Hz\n",
    "fT = 800*10**6 # # Hz\n",
    "Vt = 52*10**-3 #\n",
    "Vt1 = 0.026 #\n",
    "\n",
    "# When Vagc =0 the transistor Q2 is cut-off and the collector current of transistor Q2 flow through the transistor Q3\n",
    "# i.e Ic1=Ie1=Ie3\n",
    "Ie3 = 1*10**-3 # # A # emitter current of Q3\n",
    "Ic1 = 1*10**-3 #  # A  # collector current of the transistor Q1\n",
    "\n",
    "# it indicates that the emitter current of Q2 is zero Ie2 = 0 then the emitter resistor of Q2 is infinite\n",
    "\n",
    "re2 = inf #\n",
    "\n",
    "# emitter resistor of Q3 \n",
    "re3 = (Vt/Ie1)#\n",
    "print 'The emitter resistor of Q3 is = %0.2f'%re3,' ohm ( at temperature 25 degree celsius) '\n",
    "\n",
    "# the trans conductance of transistor is\n",
    "gm = (Ie1/Vt1)#\n",
    "print 'The trans conductance of transistor is = %0.1f'%(gm*1000),' mA/V ' # Round Off Error\n",
    "\n",
    "# the base emitter resistor rbe\n",
    "rbe = (hfe/gm)#\n",
    "print 'The base emitter resistor rbe is = %0.2f'%(rbe/1000),' K ohm ' # Round Off Error\n",
    "\n",
    "# the emitter capacitor Ce \n",
    "\n",
    "Ce = (gm/(2*pi*fT))#\n",
    "print 'The emitter capacitor Ce = %0.2f'%(Ce*1e12),' pF ' # Round Off Error\n",
    "\n",
    "# the voltage gain of video amplifier is\n",
    "# Av = (Vo/Vin) #\n",
    "# Av = -((alpha3*gm)/(rbb*re3)*((1/rbb)+(1/rbe)+sCe)*((1/re2)+(1/re3)+sC3)*((1/Rl)+(s(Cs+Cl)))) \n",
    " # At Avgc = 0 i.e s=0 in the above Av equation\n",
    "alpha3 = 1 #\n",
    "s = 0 #\n",
    "# Rl = -((alpha3*gm)/(rbb*re3)*(((1/rbb)+(1/rbe))*((1/re2)+(1/re3))*(Av)))# \n",
    "\n",
    "# After solving above equation for Rl We get Rl Equation as\n",
    "Rl = 10/(37.8*10**-3)#\n",
    "print 'The value of resistance RL is = %0.2f'%Rl,' ohm '\n",
    "\n",
    "# there are three poles present in the transfer function of video amplifier each pole generate one 3-db frequency \n",
    "Rl = 675 #\n",
    "# fa = 1/(2*pi*Rl*(Cs+Cl))#\n",
    "# after putting value of Rl ,Cs and Cl we get\n",
    "fa = 1/(2*3.14*264.55*1*10**-12)#\n",
    "print 'The pole frequency fa is = %0.2f'%(fa*10**-3/1000),' M Hz '# Round Off Error\n",
    "\n",
    "\n",
    "#fb = 1/(2*pi*Ce*((rbb*rbe)/(rbb+rbe)))#\n",
    "# after putting value of Ce rbb and rbe we get\n",
    "fb = 1/(2*pi*6.05*10**-12*24.5)#\n",
    "print 'The pole frequency fb is = %0.2f'%(fb*10**-3/1000),' M Hz '\n",
    "\n",
    "fc = 1/(2*pi*Cs*re3)#\n",
    "print 'The pole frequency fc is = %0.2f'%(fc*10**-3/1000),' M Hz '\n",
    "\n",
    "print 'Hence fa is a dominant pole frequency '"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 14.11 Pg 423"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The emitter resistor of Q3 is = 52.00  ohm \n",
      "The trans conductance of transistor is = 38.5  mA/V \n",
      "The base emitter resistor rbe is = 1.3  kohm \n",
      "The emitter capacitor is = 6.12  pF \n",
      "The value of resistance RL is = 265.00  ohm \n",
      "The pole frequency fa is = 600.58 MHz \n",
      "The pole frequency fb is = 1060.00 MHz \n",
      "The pole frequency fc is = 3060.67 MHz \n",
      "Hence fa is a dominant pole frequency \n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "from numpy import inf,pi\n",
    "# Design a video amplifier of IC 1550 circuit\n",
    "Vcc = 12 # # V\n",
    "Av = -10 #\n",
    "Vagc = 0 # # at bandwidth of 20 MHz\n",
    "hfe = 50 # # forward emitter parameter\n",
    "rbb = 25 #  # ohm  # base resistor\n",
    "Cs = 1*10**-12 #  # F  # source capacitor\n",
    "Cl = 1*10**-12 #  # F  # load capacitor\n",
    "Ie1 = 1*10**-3 # # A # emitter current of Q1\n",
    "f = 1000*10**6 # # Hz\n",
    "Vt = 52*10**-3 #\n",
    "Vt1 = 0.026 #\n",
    "\n",
    "# When Vagc =0 the transistor Q2 is cut-off and the collector current of transistor Q2 flow through the transistor Q3\n",
    "# i.e Ic1=Ie1=Ie3\n",
    "Ie3 = 1*10**-3 # # A # emitter current of Q3\n",
    "Ic1 = 1*10**-3 #  # A  # collector current of the transistor Q1\n",
    "\n",
    "# it indicates that the emitter current of Q2 is zero Ie2 = 0 then the emitter resistor of Q2 is infinite\n",
    "re2 = inf #\n",
    "\n",
    "# emitter resistor of Q3 \n",
    "re3 = (Vt/Ie1)#\n",
    "print 'The emitter resistor of Q3 is = %0.2f'%re3,' ohm '\n",
    "\n",
    "# the trans conductance of transistor is\n",
    "gm = (Ie1/Vt1)#\n",
    "print 'The trans conductance of transistor is = %0.1f'%(gm*1e3),' mA/V '\n",
    "\n",
    "# the base emitter resistor rbe\n",
    "rbe = (hfe/gm)#\n",
    "print 'The base emitter resistor rbe is = %0.1f'%(rbe/1e3),' kohm '\n",
    "\n",
    "# the emitter capacitor Ce \n",
    "Ce = (gm/(2*pi*f))#\n",
    "print 'The emitter capacitor is = %0.2f'%(Ce*1e12),' pF '\n",
    "\n",
    "# the voltage gain of video amplifier is\n",
    "# Av = (Vo/Vin) #\n",
    "# Av = -((alpha3*gm)/(rbb*re3)*((1/rbb)+(1/rbe)+sCe)*((1/re2)+(1/re3)+sC3)*((1/Rl)+(s(Cs+Cl)))) \n",
    " # At Avgc = 0 i.e s=0 in the above Av equation\n",
    "alpha3 = 1 #\n",
    "s = 0 #\n",
    "Av =-10 #\n",
    "Rl = -((alpha3*gm)/((rbb*re3)*(((1/rbb)+(1/rbe))*((1/re2)+(1/re3))*(Av))))# \n",
    "Rl = (1/Rl)#\n",
    "print 'The value of resistance RL is = %0.2f'%Rl,' ohm '\n",
    "\n",
    "# there are three poles present in the transfer function of video amplifier each pole generate one 3-db frequency \n",
    "Rl = 265\n",
    "fa = 1/(2*pi*Rl*(Cs))/1e6#\n",
    "print 'The pole frequency fa is = %0.2f'%fa,'MHz '\n",
    "\n",
    "\n",
    "fb = 1/(2*pi*Ce*((rbb*rbe)/(rbb+rbe)))/1e6\n",
    "print 'The pole frequency fb is = %0.2f'%fb,'MHz '\n",
    "\n",
    "fc = 1/(2*pi*Cs*re3)/1e6\n",
    "print 'The pole frequency fc is = %0.2f'%fc,'MHz '\n",
    "\n",
    "print  'Hence fa is a dominant pole frequency '"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 14.12 Pg 425"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The input current is = 0.50 mA \n",
      "The output of an op-amp is = 27.50  V \n"
     ]
    }
   ],
   "source": [
    "# Determine the output voltage of an isolation amplifier IC ISO100\n",
    "Vin = 5.0 # # V\n",
    "Rin = 10*10**3 # \n",
    "Rf = 55*10**3 # # ohm # feedback resistance\n",
    "\n",
    "# the input voltage of an amplifier 1\n",
    "# Vin = Rin*Iin\n",
    "Iin = Vin/Rin # \n",
    "print 'The input current is = %0.2f'%(Iin*1e3),'mA '\n",
    "\n",
    "# In isolation amplifier ISO 100 the input current Iin is equal to the output current Iout , but both are opposite in direction\n",
    "# Iin = -Iout\n",
    "# the output of an op-amp\n",
    "# Vo = -Rf*Iout\n",
    "Vo = Rf*Iin#\n",
    "print 'The output of an op-amp is = %0.2f'%Vo,' V '"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 14.13 Pg 426"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The input current is = 12 mA \n",
      "The output of an op-amp is = 204  V \n"
     ]
    }
   ],
   "source": [
    "# Determine the output voltage of an isolation amplifier IC ISO100\n",
    "Vin = 12.0 # # V\n",
    "Rin = 1*10**3 # \n",
    "Rf = 17*10**3 # # ohm # feedback resistance\n",
    "\n",
    "# the input voltage of an amplifier 1\n",
    "# Vin = Rin*Iin\n",
    "Iin = Vin/Rin # \n",
    "print 'The input current is = %0.f'%(Iin*1e3),'mA '\n",
    "\n",
    "# In isolation amplifier ISO 100 the input current Iin is equal to the output current Iout , but both are opposite in direction\n",
    "# Iin = -Iout\n",
    "# the output of an op-amp\n",
    "# Vo = -Rf*Iout\n",
    "Vo = Rf*Iin#\n",
    "print 'The output of an op-amp is = %0.f'%Vo,' V '"
   ]
  }
 ],
 "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
}