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
|
{
"metadata": {
"name": "",
"signature": "sha256:3090d4f2b3d4de5b787389193d1e9cb10abedd8dbc02a70d6ec597610190cdf7"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 2.13 page no.65\n",
"import math\n",
"\n",
"#initialization of variables\n",
"\n",
"E1=20 #supply voltage in V\n",
"E2=4 #second port voltage in V\n",
"Vd=0.7 #thresold voltage\n",
"R=2.2 #R in Kohm\n",
"\n",
"\n",
"#calculation\n",
"\n",
"I = (E1-E2-Vd)/R\n",
"\n",
"print \"Diode D1 turn on and Diode D2 turn off\"\n",
"print \"the resultant current I is %.2fmA\" %(I)\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Diode D1 turn on and Diode D2 turn off\n",
"the resultant current I is 6.95mA\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 2.14 page no.66\n",
"import math\n",
"\n",
"#initialization of variables\n",
"E=12 #supply Voltage in V\n",
"Vd=0.3 #thresold voltage in V\n",
"\n",
"\n",
"#calculation\n",
"\n",
"V0 = E-Vd\n",
"\n",
"print \"If initially both were 'on,'' the 0.7-V drop across the silicon diode would not match the 0.3 V \"\n",
"print \"across the germanium diode as required by the fact that the voltage across parallel elements must be the same\"\n",
"print \"The silicon diode will never have the opportunity to capture its required 0.7 V and therefore remains in its open-circuit state\"\n",
"print \"the resultant Voltage V0 is %.1fV\" % (V0)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"If initially both were 'on,'' the 0.7-V drop across the silicon diode would not match the 0.3 V \n",
"across the germanium diode as required by the fact that the voltage across parallel elements must be the same\n",
"The silicon diode will never have the opportunity to capture its required 0.7 V and therefore remains in its open-circuit state\n",
"the resultant Voltage V0 is 11.7V\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 2.15 page no.66\n",
"import math\n",
"\n",
"#initialization of variables\n",
"\n",
"E=20 #supply voltage in V\n",
"VT1=0.7 #thresold voltage\n",
"VT2=0.7 #thresold voltage\n",
"R1=3.3 #R in Kohm\n",
"R2=5.6 #R in Kohm\n",
"\n",
"#calculation\n",
"\n",
"print \"Both Diodes will turn 'on'\"\n",
"print \"So diode voltage will appear over the resistance\"\n",
"\n",
"I1 = (VT2)/R1\n",
"\n",
"print \"the resultant current I2 is %.3fmA\" %(I1)\n",
"\n",
"print \"Applying Kirchhoff's voltage law around the indicated loop in the clockwise direction yields\"\n",
"\n",
"V2 = E-VT1-VT2\n",
"I2 = V2/R2\n",
"\n",
"print \"the voltage V2 =%.1fV\" %(V2)\n",
"print \"the current I2 =%.2fmA\"%(I2)\n",
"\n",
"#At hte bottom node (a)\n",
"\n",
"ID2=I2-I1\n",
"\n",
"print \"the current I2 =%.3fmA\" %(ID2)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Both Diodes will turn 'on'\n",
"So diode voltage will appear over the resistance\n",
"the resultant current I2 is 0.212mA\n",
"Applying Kirchhoff's voltage law around the indicated loop in the clockwise direction yields\n",
"the voltage V2 =18.6V\n",
"the current I2 =3.32mA\n",
"the current I2 =3.109mA\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
|