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
|
{
"metadata": {
"name": "",
"signature": "sha256:a0a242a6e68dc538de9abb5ce09e495ac777f6f08436d31860a48948f4431520"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 9 - Ramp, Pulse and Function Generators"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E1 - Pg 263"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Caption:Design RC ramp generator\n",
"import math\n",
"V=5.#Output voltage(in volts)\n",
"Vs=15.#Supply voltage(in volts)\n",
"R=100.#Load resistance(in kilo ohm)\n",
"v=3.#Amplitude of triggering pulse(in volts)\n",
"vb=0.5#Bse voltage(in volts)\n",
"p=1.2#Pulse width(in ms)\n",
"t=0.1#Time interval(in ms)\n",
"vbe=0.7#Base emitter voltage(in volts)\n",
"E=0.2#Initial voltage(in volts)\n",
"e=5.#Final voltage(in volts)\n",
"hfe=50.\n",
"Il=V/R\n",
"I1=100.*Il/1000.\n",
"R1=(Vs-V)/(I1*1000.)\n",
"C1=p/(R1*math.log((Vs-E)/(Vs-e)))\n",
"Ic=10.*I1\n",
"Ib=Ic/hfe\n",
"Rb=(Vs-vbe)/(Ib*1000.)\n",
"Vbb=v-vbe-vb\n",
"I=(Vs+v)/Rb\n",
"C2=I*p/Vbb\n",
"print '%s %.1f %s %.f %s %.1f %s %.2f' %('Components required to design circuit are resistances \\nRb(in kilo ohm)=',Rb,'\\nR1(in kilo ohm)=',R1,'\\nCapacitors \\nC1(in micro farad)=',C1,'\\nC2(in micro farad)=',C2)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Components required to design circuit are resistances \n",
"Rb(in kilo ohm)= 14.3 \n",
"R1(in kilo ohm)= 2 \n",
"Capacitors \n",
"C1(in micro farad)= 1.5 \n",
"C2(in micro farad)= 0.84\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E2 - Pg 267"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Caption:Design a linear ramp generator\n",
"V=5.#Output voltage(in volts)\n",
"Vcc=15.#Supply voltage(in volts)\n",
"Vce2=3.#Voltage(in volts)\n",
"C1=1.#Capacitance(in micro fard)\n",
"t=1.#pulse width(in ms)\n",
"Vbe=0.7#Base emitter voltage(in volts)\n",
"V3=Vcc-Vce2-5\n",
"Ic=C1*V/t\n",
"R3=V3/Ic\n",
"Vb=V3+Vbe\n",
"I1=Ic/10.\n",
"R1=Vb/I1\n",
"i1=Vb/R1\n",
"V2=Vcc-Vb\n",
"R2=V2/I1\n",
"print '%s %.1f %s %.1f %s %.1f %s %.f' %('Components required to design the circuit are resistors \\nR1(in kilo ohm)=',13.4,'\\nR2(in kilo ohm)=',R2,'\\nR3(in kilo ohm)=',R3,'\\ncapacitance C1(in micro farad)=',C1)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Components required to design the circuit are resistors \n",
"R1(in kilo ohm)= 13.4 \n",
"R2(in kilo ohm)= 14.6 \n",
"R3(in kilo ohm)= 1.4 \n",
"capacitance C1(in micro farad)= 1\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E4 - Pg 270"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Caption:Determine Rsmax,Rsmin,and minimum drain source voltage\n",
"I=2.#Drain Current(in mA)\n",
"Vgsm=3.#Maximum gate source voltage(in volts)\n",
"Vgsn=0.5#Minimum gate source voltage(in volts)\n",
"V=6.#Peak voltage(in volts)\n",
"Rs1=Vgsm/I\n",
"Rs2=Vgsn*1000./I\n",
"Vds=V-Vgsm+1.\n",
"print '%s %.1f %s %.f %s %.f' %('Required resistances Rsmax(in kilo ohm)=',Rs1,'\\nRsmin(in ohm)=',Rs2,'\\ndrain source voltage(in volts)=',Vds)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Required resistances Rsmax(in kilo ohm)= 1.5 \n",
"Rsmin(in ohm)= 250 \n",
"drain source voltage(in volts)= 4\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E5 - Pg 273"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Caption:Design a UJT relaxation oscillator and find peak to peak output amplitude\n",
"import math\n",
"Vbb=20.#Supply voltage(in volts)\n",
"f=5.#Frequency(in khz)\n",
"Veb=3.#Fringe Voltage(in volts)\n",
"Ip=2.#Fringe current(in micro ampere)\n",
"Iv=1.#Emitter current(in mA)\n",
"n=0.75\n",
"Vp=3.7+(n*Vbb)\n",
"R1x=(Vbb-Vp)/Ip\n",
"R1n=(Vbb-Veb)/Iv\n",
"t=1000./f\n",
"C1=t*1443./(R1n*(math.log((Vbb-Veb)/(Vbb-Vp))))\n",
"E=Vp-Veb\n",
"print '%s %.1f %s %.f %s %.f' %('Peak to peak voltage(in volts)=',E,'\\nComponents for circuit are \\nresistor(in kilo ohm)=',R1n,'\\ncapacitance(in pf)=',C1)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Peak to peak voltage(in volts)= 15.7 \n",
"Components for circuit are \n",
"resistor(in kilo ohm)= 17 \n",
"capacitance(in pf)= 6603\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E6 - Pg 277"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Caption:Design a transistor bootstrap ramp generator\n",
"V=8.#Amplitude of output voltage(in volts)\n",
"Vd=0.7#Forward diode voltage(in volts)\n",
"Vce=0.2#Saturated collector emitter voltage(in volts)\n",
"t=1.#Interval between pulses(in ms)\n",
"Vt=3.#Triggering voltage(in volts)\n",
"E=15.#Supply voltage(in volts)\n",
"vbe=0.7#Base emitter voltage(in volts)\n",
"vb=0.5#Bse voltage(in volts)\n",
"hfe=100.\n",
"R=1.#Load resistor(in kilo ohm)\n",
"Ie1=E/R\n",
"Ie2=(V-(-E))/R\n",
"Ib1=Ie1/hfe\n",
"Ib2=Ie2/hfe\n",
"Ibc=Ib2-Ib1\n",
"I1=100.*Ibc/1000.\n",
"C1=I1*t*1000./V\n",
"Vr1=E-Vd-Vce\n",
"R1=Vr1/I1\n",
"Vc3=E/100.\n",
"C3=I1*t*1000./Vc3\n",
"Il=V/R\n",
"I1=100.*Il/1000.\n",
"Ic=10.*I1\n",
"Ib=Ic/hfe\n",
"Rb=(E-vbe)/(Ib*12.5)\n",
"Vbb=V-vbe-vb\n",
"I=(E+Vt)/Rb\n",
"C2=I*t/Vbb\n",
"print '%s %.1f %s %.f %s %.2f %s %.f' %('Circuit components are \\nresistor Rb(in kilo ohm)=',Rb,'\\ncapacitances \\nC1(in micro farad)=',C1,'\\nC2(in micro farad)=',C2,'\\nC3(in micro farad)=',C3)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Circuit components are \n",
"resistor Rb(in kilo ohm)= 14.3 \n",
"capacitances \n",
"C1(in micro farad)= 1 \n",
"C2(in micro farad)= 0.19 \n",
"C3(in micro farad)= 53\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E9 - Pg 284"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Caption:Calculate drain current\n",
"V=5.#Output peak voltage(in volts)\n",
"p=1.#Pulse width(in ms)\n",
"s=50.#Space width(in micro sec)\n",
"C=0.03#Capacitance(in micro farad)\n",
"Vp=6.#Gate source voltage(in volts)\n",
"I1=C*V*1000./p\n",
"Vi=Vp+1.\n",
"R1=Vi/I1\n",
"Id=I1*p/s\n",
"print '%s %.f' %('Drain current(in mA)=',Id)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Drain current(in mA)= 3\n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E12 - Pg 301"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Caption:Design a pulse generator using 8038 IC\n",
"p=200.#Pulse width(in micro sec)\n",
"f=1.#Pulse repetition frequency(in khz)\n",
"V=10.#Output voltage(in volts)\n",
"I=1.#Maximum current(in mA)\n",
"T=1000./f\n",
"t2=T-p\n",
"Ib=I*p/t2\n",
"Ra=V/(5.*I)\n",
"C=0.6*p/(Ra*1000.)\n",
"Rb=2.*V/(5.*(I+Ib))\n",
"Rl=V/I\n",
"print '%s %.3f %s %.f %s %.1f %s %.f' %('Circuit components are \\nCapacitance(in micro farad)=',C,'\\nResistances Rl(in kilo ohm)=',Rl,'\\nRb(in kilo ohm)=',Rb,'\\nRa(in kilo ohm)=',Ra)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Circuit components are \n",
"Capacitance(in micro farad)= 0.060 \n",
"Resistances Rl(in kilo ohm)= 10 \n",
"Rb(in kilo ohm)= 3.2 \n",
"Ra(in kilo ohm)= 2\n"
]
}
],
"prompt_number": 7
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E13 - Pg 303"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Caption:Calculate output maximum and minimum frequencies\n",
"V=15.#Supply voltage(in volts)\n",
"Imin=10.#Minimum current(in micro ampere)\n",
"Imax=1.#Maximum current(in mA)\n",
"C=3600.#Capacitor(in pF)\n",
"Rmax=V/(10.*Imin)\n",
"Rmin=V/(10.*Imax)\n",
"fmin=0.151*10.**6./(C*Rmax)\n",
"fmax=0.15*10.**6./(C*Rmin)\n",
"print '%s %.f %s %.f' %('minimum frequency(in hz)=',fmin,'\\nMaximum frequency(in khz)=',fmax)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"minimum frequency(in hz)= 280 \n",
"Maximum frequency(in khz)= 28\n"
]
}
],
"prompt_number": 8
}
],
"metadata": {}
}
]
}
|