You are on page 1of 8

25/09/2014

1
EMC 201 Measurement and
instrumentation
Chapter 4 Computerized data
acquisition systems
Chapter 4 Computerized data
acquisition systems
Outcomes:
At the end of this topic, you should be able to:
1. Represent numbers in computer system
2. Demonstrate basic analog-to-digital
conversion
3. Estimate quantization error for in A/D
converter


4.1 Introduction
Computer significantly enhance the process of
data acquisition, largely because of their
versatility and speed

Computer manage the acquisition of data
from multiple sensors, save the data,
manipulate and display the data and make use
of the results to perform control
Figure 4.1 Computerized data-acquisition system.
A multiplexer (or mux) is a device that selects
one of several analog or digital input signals
and forwards the selected input into a single
line.
A multiplexer is also called a data selector.
http://en.wikipedia.org/wiki/Multiplexer
A data acquisition system is a system that
records the input from one or more sensors.
DAQ unit
Software Vee
programming
4.1 Introduction
25/09/2014
2
In digital signal transmission, the information
in the transducer signal is converted to a
series of voltage pulses, called bits, which
transmit the information in digital code.

If the voltage of the pulse exceeds a certain
level, the pulse is on

If the voltage is below another level, the pulse
is off
4.2.3 Representing numbers in
computer systems
Computer represents numbers in base 2
(binary)
Information is stored in bistable devices called
flip-flops, which have possible states, on
and off
A series of flip-flops are required to represent
a number
E.g., 1001 9 (base 10)
Each of flip-flops represents a bit of the
number
1001

Computer breaks long binary numbers up into
segment of 8 bits, which is know as bytes
1 byte = 8 bits = 256 patterns

Bit, like an atom, the smallest unit of storage
A bit stores just a 0 or 1
"In the computer it's all 0's and 1's" ... bits

One byte = grouping of 8 bits
e.g. 01011010
One byte can store one letter, e.g. 'A' or 'x'

4.2.3 Representing numbers in
computer systems
See Examples 4.1 and 4.2


Negative numbers are commonly represented
inside computers by a technique known as 2s
complement

Normal: 4 bits
0000 1111 = 0 15

2s complement: 4 bits:
0000 0111 = 0 7
1000 1111 = -8 -1
25/09/2014
3
2s complement technique
Positive number always starts with 0 (MSB)
Negative number always starts with 1 (MSB)

General procedure:
1. Convert the integer to binary as if it were
positive
2. Invert all of the bits change 0s to 1s and
1s to 0s
3. Add 1 LSB to the final result
Floating-point numbers are handled by
keeping separate track of the two parts of the
number, the mantissa and exponent


This is
18 + 14 + 02 + 1 + 1(1/2) + 0(1/4) + 1(1/8)
= 13.625 in Decimal
http://www.mathsisfun.com/binary-number-system.html
Example: 10.1

The "10" means 2 in decimal,

The ".1" means half,

So "10.1" in binary is 2.5 in decimal
For communication purpose, the binary codes
are used to represent specific characters

For example, American Code for Information
Interchange (ASCII)

8 bits code used to represent 256 characters

ASCII are used to transfer information and not
useful for arithmetic operations.
4.3.2 Basics of analog-to-digital
converters
Analog signal is a continuous signal
representing physical measurement.

Digital signal is a discrete time signal
generated by digital modulation to represent
an analog signal.

The analog-to-digital (A/D) converter (ADC) is
the device to convert the analog transducer
signals into the digital code
The actual digital coding scheme used to
represent an analog signal (e.g. voltage) is well
defined in a particular situation, but not
universal

The digital representation is a code that
related to the analog transducer output but
does not describe the output exactly.

25/09/2014
4
Example:
Bulb 1: on when V
s
> 5.0 V
Bulb 2: on when V
s
V
1
> 2.5 V

Source Bulb 1 Bulb 2
Digital
representation
V < 2.5 off off 00
2.5 V < 5.0 off on 01
5.0 V < 7.5 on off 10
7.5 V on on 11
The output of ADC has 2
N
possible values
where N is the number of bits used to
represent the digital output.

Examples:
1 bit has 2 (2
1
) output states
2 bits has 4 (2
2
) output states
8 bits has 256 (2
8
) output states

Three primary characteristics of an ADC
1. Number of bits
2. Input range
3. Conversion speed
Number of bits the greater the number of
bits the greater the number of possible states
leads to the higher accuracy of the digital
output representing the analog output

Input range the range of analog input
voltages over which the converter will
produce a representative digital output

Input voltages outside the range will not
produce a meaningful output saturation
Mistake in input range selection
Cannot be estimate through error analysis
Input voltage must be ensured within the usable
range
Unipolar input range responds to either +
or - input,
E.g. 0 5 V, or 0 -10 V

Bipolar input range responds to both +
and - input
E.g. 5 V, or 10 V
25/09/2014
5
Unipolar single-slope integrating converter
Fixed reference voltage is used to charge an
integrator at a constant rate
The integrator output voltage will increase
linearly with time
A digital clock (counter) is started at the same
time that charging is begun
The integrator output voltage is compared
continuously with the analog input voltage using
a comparator
When the integrator voltage exceeds the analog
input, the counter is stopped and the count of
the digital clock is the digital output
See example 4.4: Unipolar single-slope
integrating converter

Figure 4.5 Ramp A/D converter process.
Bipolar converters use one of two common
codes
offset binary
Like simple binary except that for bipolar converters,
the output code of zero corresponds to the lower end
of the input range instead of an input of zero
2s complement binary
Starts with a binary number on 2
N
/2 at the lower end of
the range, has a value of zero in the center of the input
range, and rises to 2
N
/2 -1 at the upper end of the
range
Decimal representation
-8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7

Offset binary system
0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111

2s complement binary system
1000 1001 1010 1011 1100 1101 1110 1111 0000 0001 0010 0011 0100 0101 0110 0111
V
rl
V
ru
2
N
/2 - 1 2
N
/2
Figure 4.7 Formulas to estimate A/D converter digital output.
4.3.2 Basics of analog-to-digital
converters
See Examples 4.5 and 4.6
25/09/2014
6
ADC subjected to number of errors

Systematic errors: linearity, zero and
sensitivity (gain) errors
Also subjected to thermal-stability effect

Random errors: resolution error (uncertainty),
also know as quantizing error.


= 0.5

Translated into input units
= 0.5

4.1

If the input signal is varying rapidly, ADC will
cause an error due to aperture time the time
required to convert the input signal

To minimize this error, an additional device
(sample-and-hold device) is needed to read
the input value very rapidly (1.5s or less) and
hold for the conversion
4.3.3 Practical of analog-to-digital
converters
See Example 4.8

Figure 4.8 Graphical description of the method of successive approximations for
a 4-bit A/D converter. Based on Franco (2002).
Interval-halving technique is employed in
successive-approximations converter.
A series of known analog voltages are created
and compared to the analog input voltage
In the 1
st
trial, a voltage interval of one-half
the input span is compared with the input
voltage
The comparison determines whether the
input voltage is in the upper or lower half of
the input range
25/09/2014
7
If the input voltage is in the upper half of the
range, the LSB is set to 1; else it is set to 0
This process is repeated with an interval half
the width of the interval used in the 1
st
trial to
determine the second MSB and so forth until
the LSB is determined.
For N-bit converter, only N comparisons have
to be made
4.3.4 Digital-to-analog converters
Some devices operate on the basis of an
analog input voltage computer digital signals
must be converted to analog signals.
For analog device with simply on-off
operation, a digitally controlled relays can be
used
If the analog device requires proportional
control, a digital-to-analog converter (D/A
converter or DAC) is needed.
The resulting analog output voltage will be
proportional to the digital input number.

A/D converter is specified by
1. number of input bits,
2. the analog output range
3. the conversion speed
4. number of digital codes
Figure 4.12 Digital-to-analog converter. (Based on Turner, 1988.)
Problems 4.30
An 8-bit digital-to-analog converter has an
output range of 0 to 5 V. Estimate the analog
voltage output if the input is simple binary and
has the decimal value of 30.

Learning points
1. What is LSB? What is MSB?
2. What is the difference between bit and
byte?
3. Representation of negative number using 2s-
complement binary technique
4. Estimate A/D converter digital output
5. Simulation of successive approximation
converter for A/D conversion
25/09/2014
8
Tutorials
Problems (Chapter 4, pages 109 - 111)
4.6, 4.10, 4.12, 4.17, 4.22,
4.24, 4.31, 4.32, 4.34

You might also like