# Chapter5 - Digital Voltmeters¶

## Example 5.10.1 - page5-25¶

In [1]:
# Resolution
#Given data :
n=4.0  # no. of full digits
R=1/10**n
print "Resolution of voltmeter, R = ", R

Resolution of voltmeter, R =  0.0001


## Example 5.10.2 - page5-26¶

In [8]:
#Resolution
#Given data :
n=5.0  # no. of full digits
R=1.0/10**n
print "Resolution, R = %.5f" %R

Resolution, R = 0.00001


## Example 5.10.3 - page5-26¶

In [3]:
#Resolution
#Given data :
n=4.0    # no. of full digits
R=1/10**n
print "Resolution, R = ", R

Resolution, R =  0.0001


## Example 5.10.4 - page5-27¶

In [11]:
import numpy
import math
#Voltage and time interval
#Given data :
t1=1.0 #sec
R=100.0 #kohm
C=1.0 #micro F
C*=10**-6  # F
Vin=1.0 #V
Vref=5.0 #V
def integrate(a,b,f):
# def function before using this
# eg. : f=lambda t:200**2*t**2
#a=lower limit;b=upper limit;f is a function
import numpy
N=1000 # points for iteration
t=numpy.linspace(a,b,N)
#ft=f(t)
ans=numpy.sum(f)*(b-a)/N
return ans
# Calculating output vl=oltage
a=0
b=t1
Vout=1/R/C*integrate(a,b,Vin)  # V
print "Voltage developed at the output after 1 sec is ",Vout," V"
#Vout=Vref*t2/R/C & Vout=Vin*t1/R/C
t2=t1*Vin/Vref #sec
print "Time interval t2 is ",t2," sec"

Voltage developed at the output after 1 sec is  10.0  V
Time interval t2 is  0.2  sec