# Time required for each conversion
import math
#Variable declaration
n = 8.0 #8-bit resolution(conversion of 1 in 256)
Tr = 10.0*10**-6 #total trace time(256 conversions in 10*10^-6 s)
Nc = 256.0 #total conversions
#Calculations
S = (Tr/Nc) #speed of ADC
#Result
print("Time required for each conversion = %d ns"%(S*10**9))
# find frequency at horizontal plate
import math
#Variable declaration
fy=1.8*10**3 #frequency at vertical plates
Nv=2.0 #vertical tangencies
Nh=3.0 #horizontal tangencies
#Calculations
fx=fy*(Nv/Nh) #frequency at horizontal plates
#Result
print("frequency of other wave:")
print("fx = %.1f kHz"%(fx/1000))
# find length of vertical axis of ellipse
import math
#Variable declaration
phi = math.pi*30/180 #conversion into radian
bplus = 3 #ellipse cutting +ve minor axis
bminus=-3 #ellipse cutting -ve minor axis
#Calculations
theta = math.atan(2.0/1.0) #angle of major axis of ellipse(Vy/Vh=2:1)
y1=(bplus/math.sin(phi)) #length of vertical axis
#Result
print("length of vertical axis:")
print("y1 = (+/-)%.2f cm"%y1)
# find voltage applied between plates
import math
#Variable declaration
d=1*10**-3 #separation between plates
fe=300 #acceleration of electron
e=1.6*10**-19 #charge of 1 electron
me=9.1*10**-31 #mass of 1 electron
#Calculations
Vp=((me*fe*d)/e) #voltage apllied between plates
#Result
print("Voltage applied between plates:")
print("Vp = %.2f * 10^-12 Kgm^2/s^2C"%(Vp*10**12))
# deflection sensitivity
import math
#Variable declaration
l=1*10**-2 #axial length of plates
D=22*10**-2 #distance between centre of plate and screen
Vap=1.3*10**3 #acceleration mode voltage
d = 1*10**-3 #output in mm
#Calculations
Sd=500*l*(D/(d*Vap)) #deflection senstivity
#Result
print("deflection sensitivity:")
print("Sd = %.2f mm/V"%Sd)
# find deflection of electron
import math
#Variable declaration
Vp=0.1*10**3 #deflection plate voltage
e=1.6*10**-19 #charge of electron
l=1*10**-2 #axial length of plates
del1=1*10**-3 #output in mm
m=9.1*10**-31 #mass of electron
D=0.22*10**-2 #distance between centre of plates and screen
t=0.1*10**-6 #time of flight
#Calculations
del2=((Vp*e*l*D)/(del1*m))*(10**-10)
#Result
print("deflection of electron beam from null pos:")
print("del = %.f cm"%(math.floor(del2)))
# cutoff frequency of filter
import math
#Variable declaration
R=10*10**5 #scope input impedance
C1=0.31*62*10**-12 #probe capacitance
C2=22*10**-12 #probe input impedance
#Calculations
fcut = (1/(2*math.pi*R*(C1+C2)))
fcut = fcut/1000 # kHz
#Result
print("cutoff frequency:")
print("fcut = %.1f kHz"%(math.floor(fcut*10)/10))
# phase difference
import math
#Variable declaration
bplus=3.0 #ellipse parameter
bminus=-3.0 #ellipse parameter
aplus=1.5 #ellipse parameter
aminus=-1.5 #ellipse parameter
#case-1
y=6.0 #y-intercept
x=3.0 #x-intercept
phi1=math.asin(x/y) #phase difference
phi1=(180/math.pi)*phi1
#case-2
phi2=180-phi1 #major axis in 2 and 4 quad.
#case-3
phi3=math.asin(0) #y2=0
#case-4
phi4=180-phi3 #y2=0 (major axis in 2 and 4 quad.)
#Calculation
print("phi1 = %.1f° "%phi1)
print("phi2 = %.1f° "%phi2)
print("phi3 = %.1f° or 360° "%phi3)
print("phi4 = %.1f° "%phi4)
# rise time of pulse
import math
#Variable declaration
B=25*10**6 #bandwidth of scope
#Calculatoins
tr=(3.5/B) #rise time of scope
#Result
print("Rise time of scope:")
print("tr = %.2f micro-sec"%(tr*10**6))
# find speed of conversion
import math
#Variable declaration
Res=(1.0/2**8) #resolution
T=8.0*10**-6 #total time
n=256.0 #no. of conversions
#Calculations
t=(T/n) #time req. by one conversion
S=(1.0/t) #speed of conversion
#Result
print("speed of conversion:")
print("S = %.1f MHz\n"%(S*10**-6))
#Answer is not matching with the book
# Find total collector resistance
import math
#Variable declaration
C=0.01*10**-6 #timing capacitor
T=10*10**-3 #time period
#Calculations
Rt=T/(4*C) #total collector resistance
#Result
print("Total collector resistance:")
print("Rt = %.f k-ohm"%(Rt/1000))
# deflection plates voltage
import math
#Variable declaration
d1=1.03*10**-2 #separation of plates
theta=(6.0/5.0) #deflection of electron(1(deg.)12'=(6/5)deg.)
l=2.2*10**-2 #length of deflection plate
Vap=2.2*10**3 #accelerating potential
#Calculations
x=math.tan((math.pi/180)*(6.0/5.0))
x = 0.019 # value of above expression should be this
Vp=(x/l)*d1*Vap*2
#Result
print("Potential between plates:")
print("Vp = %d V"%Vp)