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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 21: Bipolar Transistors"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 21.1, Page 445"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Output Current, I = 2.04 mA\n",
"Output Voltage, V = 4.5 V\n"
]
}
],
"source": [
"import math\n",
"#Initialization\n",
"vcc=10 #voltage\n",
"vbe=0.7 #voltage, base-to-emitter junction\n",
"rb=910*10**3 #resistance in ohm\n",
"hfe=200\n",
"rc=2.7*10**3 #resistance in ohm\n",
"\n",
"#Calculation\n",
"ib=(vcc-vbe)/rb #base current in ampere\n",
"ic=hfe*ib #collector in current in ampere\n",
"vo=vcc-(ic*rc) #output voltage\n",
"\n",
"#Result\n",
"print'Output Current, I = %.2f mA'%(ic*10**3)\n",
"print'Output Voltage, V = %.1f V'%vo"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 21.2, Page 445"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Quiescent Output Voltage, V = 5.6 V\n"
]
}
],
"source": [
"import math\n",
"#Initialization\n",
"vcc=10 #voltage\n",
"r2=10*10**3 #resistance in ohm\n",
"r1=27*10**3 #resistance in ohm\n",
"vbe=0.7 #voltage, base-to-emitter junction\n",
"re=10**3 #resistance in ohm\n",
"rc=2.2*10**3 #resistance in ohm\n",
"\n",
"#Calculation\n",
"vb=vcc*(r2*(r1+r2)**-1) # base voltage\n",
"ve=vb-vbe #emitter voltage\n",
"ie=ve/re #emitter current\n",
"ic=ie #collector current\n",
"vo=vcc-(ic*rc) #output voltage\n",
"\n",
"#Result\n",
"print'Quiescent Output Voltage, V = %.1f V'%vo\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 21.3, Page 448"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Voltage Gain = -2.2 mA\n"
]
}
],
"source": [
"import math\n",
"#Initialization\n",
"re=10**3 #resistance in ohm\n",
"rc=2.2*10**3 #resistance in ohm\n",
"\n",
"#Calculation\n",
"gain=-rc/re #voltage gain\n",
"\n",
"#Result\n",
"print'Voltage Gain = %.1f mA'%gain\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 21.4, Page 451"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Voltage Gain = 64 Hz\n"
]
}
],
"source": [
"import math\n",
"#Initialization\n",
"r1=15*10**3 #resistance in ohm\n",
"r2=47*10**3 #resistance in ohm\n",
"C=220*10**-9 #capacitance in farad\n",
"\n",
"#Calculation\n",
"ri=(r1*r2)/(r1+r2) #resistance in paraller\n",
"fco=1/(2*math.pi*C*ri) #frequency in Hz\n",
"\n",
"\n",
"#Result\n",
"print'Voltage Gain = %d Hz'%round(fco)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 21.5, Page 453"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Quiescent Output Voltage, V = 2.0 V\n"
]
}
],
"source": [
"import math\n",
"#Initialization\n",
"vcc=10 #voltage\n",
"r2=10*10**3 #resistance in ohm\n",
"r1=27*10**3 #resistance in ohm\n",
"vbe=0.7 #voltage, base-to-emitter junction\n",
"re=10**3 #resistance in ohm\n",
"rc=2.2*10**3 #resistance in ohm\n",
"\n",
"#Calculation\n",
"vb=vcc*(r2*(r1+r2)**-1) # base voltage\n",
"ve=vb-vbe #emitter voltage\n",
"\n",
"\n",
"#Result\n",
"print'Quiescent Output Voltage, V = %.1f V'%ve\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python [Root]",
"language": "python",
"name": "Python [Root]"
},
"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.12"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|