summaryrefslogtreecommitdiff
path: root/sample_notebooks/DaudIbrahir Saifi/Chapter_07.ipynb
blob: d7167f86cb51e400892474486aef513c3786c8c6 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:012ab8557afdcfdae2cdc3da17271647415fc17ab95dd187f4df0903472edf45"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter - 7 : Cathode Ray Oscilloscopes"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example :  7.1 - Page No : 244"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "l=2.5 # in cm\n",
      "l=l*10**-2 # in meter\n",
      "d=.5 # in cm\n",
      "d=d*10**-2 # in meter\n",
      "S= 20 # in cm\n",
      "S= S*10**-2 # in meter\n",
      "Va= 2500 # in volts\n",
      "# Formula y = OC*AB/OB = (S*d/2)/(l/2)\n",
      "y = (S*d/2)/(l/2) # in meter\n",
      "print \"The value of deflection = %0.f cm\" %(y*10**2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of deflection = 4 cm\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example :  7.2 - Page No : 244"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " #Given data\n",
      "R_E1= 5.6 # in kohm\n",
      "C1= 0.2 # in micro F\n",
      "V_B1= 6.3 # in volt\n",
      "V_BE= 0.7 # in volt\n",
      "TL= 2.5 # trigger level for the Schmitt trigger (UTP,LTP) in volt\n",
      "del_V1= 2*TL # in volt\n",
      "I_C1= (V_B1-V_BE)/R_E1 # in mA\n",
      "print \"Charging current = %0.f mA\" %I_C1 \n",
      "toh= del_V1*C1/I_C1 # in ms\n",
      "print \"Time period = %0.f ms\" %toh"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Charging current = 1 mA\n",
        "Time period = 1 ms\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example :  7.3 - Page No : 255"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import sqrt \n",
      "#Given data\n",
      "L=10 # trace length in cm\n",
      "DS= 5 # deflection sensitivity in V/cm\n",
      "V_peakTOpeak= L*DS # in volt\n",
      "V_peak= V_peakTOpeak/2 # in volt\n",
      "RMS= V_peak/sqrt(2) # RMS value of unknown as voltage in volt\n",
      "print \"The value of AC voltage = %0.3f volts\" %RMS "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of AC voltage = 17.678 volts\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example :  7.4 - Page No : 255"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division \n",
      "#Given data\n",
      "Y= 2+1/2 # Positive Y-peaks in pattern\n",
      "X= 1/2+1/2 # Positive X-peaks in pattern\n",
      "f_h= 3# frequency of horizontal voltage signal in kHz\n",
      "f_yBYf_x= Y/X \n",
      "# frequency of vertical voltage signal= f_yBYf_x * f_h\n",
      "f_v= f_yBYf_x * f_h # frequency of vertical voltage signal in kHz\n",
      "print \"frequency of vertical voltage signal = %0.1f kHz\" %f_v "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "frequency of vertical voltage signal = 7.5 kHz\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example :  7.5 - Page No : 256"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " #Given data\n",
      "f_x= 1000 # in Hz\n",
      "Y= 2 # points of tangency to vertical line\n",
      "X= 5 # points of tangency to horizontal line\n",
      "f_y= f_x*X/Y # in Hz\n",
      "print \"Frequency of vertical input = %0.f Hz\" %f_y"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Frequency of vertical input = 2500 Hz\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example :  7.6 - Page No : 257"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " #Given data\n",
      "f=2000 # in Hz\n",
      "T=1/f # in sec\n",
      "D=0.2 \n",
      "PulseDuration= D*T # in sec\n",
      "print \"The value of pulse duration = %0.1f ms\" %(PulseDuration*10**3) "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of pulse duration = 0.1 ms\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example :  7.7 - Page No : 258"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " #Given data\n",
      "vertical_attenuation= 0.5 # in V/Div\n",
      "TPD= 2 # time/Div control in micro sec\n",
      "P= 4*vertical_attenuation # peak-to-peak amplitude of the signal in V \n",
      "print \"Peak-to-Peak amplitude of the signal = %0.f V\" %P\n",
      "T= 4*TPD # in micro sec\n",
      "T=T*10**-6 # in sec\n",
      "f=1/T # in Hz\n",
      "print \"The value of frequency = %0.f kHz\" %(f*10**-3)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Peak-to-Peak amplitude of the signal = 2 V\n",
        "The value of frequency = 125 kHz\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example :  7.8 - Page No : 261"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from numpy import pi \n",
      "#Given data\n",
      "C_1N= 36 # in pF\n",
      "C_2= 150 # in pF\n",
      "R_1N= 1 # in M ohm\n",
      "R_1= 10 # in M ohm\n",
      "R_source= 500 # in ohm\n",
      "# R_1/(omega*(C_2+C_1N)) = R_1N/(omega*C_1)\n",
      "C_1= R_1N*(C_2+C_1N)/R_1 # in pF\n",
      "C_T= 1/(1/C_1+1/(C_2+C_1N)) # in pF\n",
      "C_T= C_T*10**-12 # in F\n",
      "f= 1/(2*pi*C_T*R_source) \n",
      "print \"Signal Frequency = %0.2f MHz\" %(f*10**-6)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Signal Frequency = 18.82 MHz\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example :  7.9 - Page No : 263"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " #Given data\n",
      "f= 20 # in MHz\n",
      "f=f*10**6 # in Hz\n",
      "toh= 1/f # in sec\n",
      "toh=toh*10**9 # in ns\n",
      "# For one cycle occupying 4 horizontal divisions,\n",
      "MTD= toh/4 # Minimum time/division in ns/division\n",
      "# Using the 10 times magnifier to provide MTD\n",
      "MTD_setting= 10*MTD # minimum time/division setting in ns/division\n",
      "print \"Minimum time/division setting = %0.f ns/division\" %MTD_setting"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Minimum time/division setting = 125 ns/division\n"
       ]
      }
     ],
     "prompt_number": 12
    }
   ],
   "metadata": {}
  }
 ]
}