Chapter 7 : Oscilloscopes

Example - 7.1 : Page No - 7.26

In [2]:
from __future__ import division
from math import sqrt
#Given data
BW = 25 #bandwidth in MHz
Trd = 20 #rise time in ns
Trd = Trd * 10**-9 # in s
# BW = 0.35/Tro 
Tro = 0.35/(BW*10**6) # in s
# Trd = sqrt( (Trs**2) + (Tro**2) ) 
Trs = sqrt( (Trd**2)-(Tro**2) ) # rise time of signal in sec
Trs = Trs * 10**9 # in ns
print "The rise time of signal = %0.2f ns " %Trs
The rise time of signal = 14.28 ns 

Example - 7.2 : Page No - 7.26

In [3]:
#Given data
Trs = 17 #rise time in µs
Trs = Trs * 10**-6 # in s
Trd = 21 # in µs
Trd = Trd * 10**-6 # in s
# Trd = sqrt( (Trs**2) + (Tro**2) ) 
Tro = sqrt( (Trd**2)- (Trs**2) ) # in sec
BW = 0.35/Tro #band width  in Hz
BW = BW * 10**-3 # in kHz
print "The band width = %0.3f kHz " %BW
The band width = 28.389 kHz 

Example - 7.3 : Page No - 7.36

In [5]:
#Given data
subdivision = 1/5 #sub division in units
positivepeak = 2.6 #positive peak in units
Vpp = positivepeak + positivepeak #peak to peak in divisions
verticalattenuation = 2 #vertical attenuation in mV/div
verticalattenuation = verticalattenuation * 10**-3 # in V/div
Vpp = Vpp * verticalattenuation # in V
Vpp = Vpp * 10**3 # in mV
Vm = Vpp/2  #amplitude of the sinusoidal voltage  in mV
print "The amplitude of the sinusoidal voltage = %0.1f mV " %Vm
V_RMS = Vm/sqrt(2) #r.m.s. value of the sinusoidal voltage in mV
print "The r.m.s. value of the sinusoidal voltage = %0.4f mV " %V_RMS
The amplitude of the sinusoidal voltage = 5.2 mV 
The r.m.s. value of the sinusoidal voltage = 3.6770 mV 

Example - 7.4 : Page No - 7.38

In [6]:
#Given data
voltsBYdiv = 2 #volts per division in V/div
Timebase = 2 #base time in ms/div
Verticaloccupancy = 3 #Vertical occupancy in cm
Vpp = voltsBYdiv*Verticaloccupancy #peak to peak voltage in V
Vm = Vpp/2 # in V
V_RMS = Vm/sqrt(2) #r.m.s. value of the voltage in V
print "The r.m.s. value of the voltage = %0.4f V " %V_RMS
Horizontaloccupancy = 2 #Horizontal occupancy in cm
timeBYdiv = 2 #time per division in mV
timeBYdiv = timeBYdiv*10**-3 # in V
T = timeBYdiv*Horizontaloccupancy # in sec
f = 1/T # in Hz
print "The frequency = %0.f Hz " %f
The r.m.s. value of the voltage = 2.1213 V 
The frequency = 250 Hz 

Example - 7.5 : Page No - 7.41

In [10]:
from math import asin
from numpy import pi
#Given data
y1 = 8 # in units
y2 = 10 # in units
phi = asin(y1/y2)*180/pi # phase difference in degree
print "The phase difference = %0.2f degree " %phi
The phase difference = 53.13 degree 

Example - 7.6 : Page No - 7.42

In [11]:
#Given data
verticaltangencies = 2 # vertical tangencies
horizontaltangencies = 5 # horizontal tangencies
f_H = 1 # frequency in kHz
# f_V/f_H = horizontaltangencies/verticaltangencies 
f_V = (horizontaltangencies/verticaltangencies)*f_H #unknown frequency of vertical signal  in kHz
print "The unknown frequency of vertical signal = %0.1f kHz " %f_V
The unknown frequency of vertical signal = 2.5 kHz 

Example - 7.7 : Page No - 7.50

In [12]:
#Given data
Cin = 35 # in pF
# (R1+Rin)/Rin = 10 
RinBYR1= 1/9 
#while balance equation with compensating capacitor
#  R1*C1 = Rin*(C2+Cin) 
C1= Cin*RinBYR1 #compansating capacitor  in pF
print "The compansating capacitor = %0.2f pF " %C1
The compansating capacitor = 3.89 pF 

Example - 7.8 : Page No - 7.68

In [13]:
#Given data
n = 10 # number of cycle
fs = 1 #signal frequency in kHz
fs = fs * 10**3 # in Hz
Timeperiod = n/fs #time period in sec
Samplingfrequency = 1/Timeperiod #Sampling frequency in samples/sec
print "The sampling rate for 1 kHz = %0.f samples/sec " %Samplingfrequency
fs = 10 # in kHz
fs = fs * 10**3 # in Hz
Samplingperiod = n/fs #Sampling period in sec
Samplingfrequency = 1/Samplingperiod #sampling rate for 10 kHz in samples/sec
print "The sampling rate for 10 kHz = %0.f samples/sec " %Samplingfrequency
The sampling rate for 1 kHz = 100 samples/sec 
The sampling rate for 10 kHz = 1000 samples/sec 

Example - 7.9 : Page No - 7.69

In [14]:
#Given data
Samplingrate = 200 #Sampling rate in MS/s
Samplingrate = Samplingrate * 10**6 # in S/s
t_r = 1/Samplingrate #minimum rise time of pulse in s
t_r = t_r * 10**9 # in ns
print "The minimum rise time of pulse = %0.f ns " %t_r
The minimum rise time of pulse = 5 ns 

Example - 7.10 : Page No - 7.76

In [15]:
#Given data
Vd = 4 # vertical division
Va = 0.5 #Vertical attenuation in V/Div
App = Vd*Va #peak to peak amplitude in V
print "The peak to peak amplitude of the signal = %0.f V " %App 
TimebyDiv = 2 #time per division in µs/Div
Hd = 4 # horizontal division
Time = Hd*TimebyDiv # in µs
f = 1/(Time*10**-6) # frequency of signal in Hz
f = f * 10**-3 # in kHz
print "The frequency of signal = %0.f kHz " %f
The peak to peak amplitude of the signal = 2 V 
The frequency of signal = 125 kHz 

Example - 7.11 : Page No - 7.76

In [16]:
#Given data
Rin = 2 #resistance in Mohm
Cin = 50 #capacitance in pF
Cin = Cin * 10**-12 # in F
# (R1+Rin)/Rin = 10 
R1 = 9*Rin #resistance in Mohm
print "The value of R1 = %0.f MΩ " %R1
R1 = R1*10**6 # in ohm
Rin = Rin * 10**6 # in ohm
# While balance equation with compensating capacitor
# R1*C1 = Rin*(C2+Cin)
C1 = (Rin*Cin)/R1 # in F(neglecting C2)
C1 = C1 * 10**12 # in pF
print "The value of C1 = %0.2f pF " %C1
The value of R1 = 18 MΩ 
The value of C1 = 5.56 pF