summaryrefslogtreecommitdiff
path: root/Basic_Electronics_(Electronics_Engineering)_by_J.B.Gupta/chapter15.ipynb
blob: 242a7d1733d8f47d5c08aacc31a52488c5edc3f3 (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
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#Chapter 15 , Cathode Ray Oscilloscope"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example 15.1 , Page Number 537"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Deflection sensitivity :  0.167 mm/V.\n"
     ]
    }
   ],
   "source": [
    "#Variables\n",
    "\n",
    "l = 25.0 * 10**-3                #Length of plates (in meter)\n",
    "d = 5.0 * 10**-3                 #Distance between plates (in meter)\n",
    "S = 0.20                         #Distance between screen and centre of plates (in meter) \n",
    "Va = 3000.0                      #Accelerating voltage (in volts)\n",
    "tracelen = 0.1                   #Trace length (in meter)\n",
    "y = tracelen/2                   #vertical distance (in meter)\n",
    "\n",
    "#Calculation\n",
    "\n",
    "Vd = 2*d*Va*y/(l*S)              #Deflecting voltage (in volts)\n",
    "Vrms = Vd/2**0.5                 #RMS value of voltage (in volts)\n",
    "defsen = l*S/(2*d*Va)            #Deflection sensitivity (in meter per volt)\n",
    "\n",
    "#Result\n",
    "\n",
    "print \"Deflection sensitivity : \",round(defsen * 10**3,3),\"mm/V.\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example 15.2 , Page Number 537"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Maximum velocity of electrons :  18.75 e+6 m/s.\n"
     ]
    }
   ],
   "source": [
    "#Variables\n",
    "\n",
    "Va = 1000.0                       #Accelerating voltage (in volts)\n",
    "e = 1.6 * 10**-19                 #Charge on electron (in Coulomb)\n",
    "m = 9.1 * 10**-31                 #Mass of electron (in kilogram) \n",
    "\n",
    "#Calculation\n",
    "\n",
    "v = (2*Va*e/m)**0.5               #Maximum velocity of electrons (in meter per second) \n",
    "\n",
    "#Result\n",
    "\n",
    "print \"Maximum velocity of electrons : \",round(v*10**-6,2),\"e+6 m/s.\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example 15.3 , Page Number 538"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Applied voltage :  100.0 V.\n"
     ]
    }
   ],
   "source": [
    "#Variables\n",
    "\n",
    "defsen = 0.05 * 10**-3           #Deflection Sensitivity (in meter per volt)\n",
    "spotdef = 5.0 * 10**-3           #Deflection factor (in volt per meter)\n",
    "\n",
    "#Calculation\n",
    "\n",
    "V = spotdef/defsen               #Applied voltage (in volts)\n",
    "\n",
    "#Result\n",
    "\n",
    "print \"Applied voltage : \",V,\"V.\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example 15.4 , Page Number 538"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Deflection sensitivity :  0.1667 mm/V.\n",
      "Deflection factor :  6.0 V/mm.\n"
     ]
    }
   ],
   "source": [
    "#Variables\n",
    "\n",
    "l = 20.0 * 10**-3                #Length of plates (in meter)\n",
    "d = 5.0 * 10**-3                 #Distance between plates (in meter)\n",
    "S = 0.25                         #Distance between screen and centre of plates (in meter) \n",
    "Va = 3000.0                      #Accelerating voltage (in volts)     \n",
    "\n",
    "#Calculation\n",
    "\n",
    "defsen = l*S/(2*d*Va)            #Deflection Sensitivity (in meter per volt)\n",
    "deffact = 1/defsen               #Deflection factor (in volt per meter)\n",
    "\n",
    "#Result\n",
    "\n",
    "print \"Deflection sensitivity : \",round(defsen*10**3,4),\"mm/V.\"\n",
    "print \"Deflection factor : \",deffact*10**-3,\"V/mm.\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example 15.6 , Page Number 549"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Ratio of freqency of vertical and horizontal signals :  1.5 .\n"
     ]
    }
   ],
   "source": [
    "#Variables\n",
    "\n",
    "tangv = 3.0                      #Positive of Y - peak to vertical line\n",
    "tangh = 2.0                      #Positive of X - peak to horizontal line \n",
    "\n",
    "#Calculation\n",
    "\n",
    "ratio = tangv/tangh              #Ratio of freq. of vertical and horizontal signals \n",
    "\n",
    "#Result\n",
    "\n",
    "print \"Ratio of freqency of vertical and horizontal signals : \",ratio,\".\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example 15.7 , Page Number 549"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Frequency of vertical input :  7500.0 Hz.\n"
     ]
    }
   ],
   "source": [
    "#Variables\n",
    "\n",
    "fx = 3.0 * 10**3                 #Frequency of horizontal input (in Hertz)\n",
    "tangv = 2.5                      #Positive of Y - peak to vertical line\n",
    "tangh = 1.0                      #Positive of X - peak to horizontal line \n",
    "\n",
    "#Calculation\n",
    "\n",
    "fy = fx*tangv/tangh              #Frequency of vertical input (in Hertz)\n",
    "\n",
    "#Result\n",
    "\n",
    "print \"Frequency of vertical input : \",fy,\"Hz.\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example 15.8 , Page Number 549"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Frequency of vertical input :  2500.0 Hz.\n"
     ]
    }
   ],
   "source": [
    "#Variables\n",
    "\n",
    "fx = 1000.0                      #Frequency of horizontal input (in Hertz)\n",
    "tangv = 2.0                      #Points of tangency to vertical line\n",
    "tangh = 5.0                      #Points of tangency to horizontal line \n",
    "\n",
    "#Calculation\n",
    "\n",
    "fy = fx*tangh/tangv              #Frequency of vertical input (in Hertz)\n",
    "\n",
    "#Result\n",
    "\n",
    "print \"Frequency of vertical input : \",fy,\"Hz.\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example 15.9 , Page Number 549"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Mark to Space ratio :  0.25 .\n",
      "Pulse frequency :  50.0 kHz.\n",
      "Magnitude of pulse voltage :  0.43 V.\n"
     ]
    }
   ],
   "source": [
    "#Variables\n",
    "\n",
    "div = 1.0                   #One division = one cm (in cm)\n",
    "mark = 0.4                  #One mark (in cm)\n",
    "space = 1.6                 #One space (in cm)\n",
    "Amp = 2.15                  #Amplitude \n",
    "Ampctrl = 0.2               #Signal amplitude control (in volt per division) \n",
    "tbctrlset = 10.0 * 10**-6   #Time based control setting (in seconds)\n",
    "\n",
    "#Calculation\n",
    "\n",
    "MtoS = mark/space            #Mark to space ratio\n",
    "T = (space + mark)*tbctrlset #Pulse time period (in seconds)\n",
    "f = 1/T                      #Pulse frequency (in Hertz)\n",
    "Vp = Amp * Ampctrl           #Magnitude of pulse voltage (in volts) \n",
    "\n",
    "#Result\n",
    "\n",
    "print \"Mark to Space ratio : \",round(MtoS,2),\".\"\n",
    "print \"Pulse frequency : \",(f*10**-3),\"kHz.\"\n",
    "print \"Magnitude of pulse voltage : \",Vp,\"V.\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example 15.10 , Page Number 550"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "RMS value of ac voltage :  17.678 V.\n"
     ]
    }
   ],
   "source": [
    "#Variables\n",
    "\n",
    "L = 10                            #Length of trace (in cm)\n",
    "S = 5                             #Deflection sensitivty (in volt per cm)\n",
    "\n",
    "#Calculation\n",
    "\n",
    "Vpktopk = L*S                     #Voltage peak-to-peak (in volts)\n",
    "Vpeak = Vpktopk/2                 #Peak value of voltage (in volts)\n",
    "Vrms = Vpeak/2**0.5               #RMS of peak value (in volts) \n",
    "\n",
    "#Result\n",
    "\n",
    "print \"RMS value of ac voltage : \",round(Vrms,3),\"V.\"\n",
    "\n",
    "#Slight variations due to higher precision."
   ]
  }
 ],
 "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.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}