Vous êtes sur la page 1sur 42

Data Acquisition and

Interfacing
Lecture 18
5-axis teaching robot Chan Hian
Full
System Set-up
Interfacing card installed in CPU
PCL-812PG
PCL-839
drivers
Mechanical parts
transmission, stepper motors
PC-based Process Control Monitoring System - Chai
Song Ling
System Set-up
PC and Data Acquisition
System
Data Acquisition system
sensor and signal
conditioner
Introduction
A data acquisition system consists of many
components that are integrated to:

Sense physical variables (use of transducers)
Condition the electrical signal to make it
readable by an A/D board
Convert the signal into a digital format
acceptable by a computer
Process, analyze, store, and display the
acquired data with the help of software

Data Acquisition System
Block Diagram
Flow of information in DAQ
1. Input transducer measure physical quantity
2. Output from transducer conditioned i.e. amplify, filter,
conversion
3. Conditioned analog signal digitized using ADC
4. Digital information acquired, process and record by
computer
5. Modify physical signal, digital output converted to
analog by DAC
6. Analog signals are conditioned
7. Output transducer interact with physical variables
Transducers
Sense physical phenomena and translate it into
electric
signals.

Examples:

Temperature
Pressure
Light
Force
Displacement
Level
Electric signals
ON/OFF switch
Signal Conditioning
Electrical signals are conditioned so they can
be used by an analog input board. Types of
signal conditioner:

Amplification
Isolation
Filtering
Linearization
Analog to Digital (A/D) Converter
Input signal
Sampling rate
Throughput
Resolution
Range
Gain

A/D Converter: Input Signal
Analog
Signal is continuous
Example: strain gage. Most transducers
produce analog signals

Digital
Signal is either ON or OFF
Example: light switch.

The data is acquired by an ADC using a
process called sampling.
Sampling a analog signal - taking a sample of
the signal at discrete times.
A/D Converter: Sampling
A/D Converter: Sampling Rate
Determines how often conversions take
place.
The higher the sampling rate, the better.
Analog
Input
4 Samples/cycle
8 Samples/cycle
16 Samples/cycle
This rate at which the signal is sampled -
sampling frequency.
Sampling frequency - determines the quality
of the analog signal that is converted.
Higher sampling frequency achieves better
conversion of the analog signals
A signal of lower frequency is generated
from such a process (this is called aliasing).
Issermann:
Ts /15 < sampling time< Ts/6
Ts = settling time = 90% complete
A/D Converter: Sampling Rate
Aliasing
Acquired signal gets distorted if sampling
rate is too small.

Analog-to-Digital Conversion
An ADC converts an analog
voltage to a digital number.
The digital number represents
the input voltage in discrete
steps with finite resolution.
ADC resolution is determined
by the number of bits that
represent the digital number.
Analog to Digital Conversion for a 3-bit ADC
A/D Converter: Resolution
Resolution
The resolution = is a function of number of bits ADC uses to
represents digital data
The higher the resolution, the higher voltage range is broken
into, and therefore, the smaller the detectable voltage change.
A 8 bit ADC gives 256 levels (2^8) compared to a 12 bit ADC
that has 4096 levels (2^12).
Hence, 12 bit ADC will be able to detect smaller increments of
the input signals then a 8 bit ADC.
LSB or least significant bit is defined as the minimum
increment of the voltage that a ADC can convert
E.g. - For full scale input signal of 10V, the LSB for a 3-bit
ADC corresponds to 10/2^3=1.25V. However, for a 12 bit
ADC, LSB = 10/2^12=10/4096=2.44mV.
LSB varies with the
operating input voltage
range of the ADC.

If the full scale of the
input signal is 10V than
the LSB for a 3-bit
ADC corresponds to
10/2^3=1.25V

For a 12 bit ADC, LSB=
10/2^12 =10/4096
=2.44mV.
Resolution of ADC,
X axis is analog input
Bits
The smallest unit in
digital signal is the bit,
a contraction of the
more descriptive
phase of binary digit.

A bit is a single
element in digital
signal, having only two
possible states: on
(indicating 1) or off
(indicating 0).
Off
0
On
1
Bytes
Bits are organized into
larger units called bytes,
the basic unit of
information in a computer
system.

A basic byte contains 8 bits.
The total amount of
information it can convey is
2
8
(=256) possible
combinations.
Off
0
On
1
Off
0
Off
0
Off
0
Off
0
On
1
Off
0
1 byte = 8 bit = 2 nibble
2-byte = 16 bit, 4-byte = 32bit
1 Kbyte = 12
10
byte = 1024 byte
1 Mbyte = 12
10
2
10
= 1,018,576byte
1GB = 2
30

1TB = 2
40

Analog-to-Digital Converter
Theory
N-bit
ADC
Analog
Input
N-bit
Digital Output
Analog Input Signal
0 Volt
1 Volt
Digital Output Code
. 5 V
. 25 V
. 75 Volt
000
001
010
011
100
101
110
111
3-bit ADC Scale
. 125
. 375
. 625
. 875
Step Size =

= 0.125 V
3
2
1
2
1

N
Example of Encoding (8-bit
system)
Data Bus Line D7 D6 D5 D4 D3 D2 D1 D0
Value
2
7
(128)
2
6
(64)

2
5
(32)

2
4
(16)

2
3
(8)

2
2
(4)

2
1
(2)

2
0
(1)

Decimal Value 167
Binary Code 1 0 1 0 0 1 1 1


Encoding (8-bit Bus, 0-5 V Input)
Analog Input (V) Decimal Number Digital Output
0 0 0000 0000
1.2 0011 1101
3.7 10111101
5 255 1111 1111
61 2 . 61 255
0 . 5
2 . 1

189 76 . 188 255
0 . 5
7 . 3

Elementary Bus Structure
Micro-
processor
Monitor
ROM
Optional
User ROM
System
& User
RAM
User
Input/Output
Address Bus
Data Bus
Keyboard
System
Input/Output
Display
Addr bus which addr to go
Data bus data from CPU to addr
Control bus command from CPU
http://www.chassis-
plans.com/PDF/T4I_Reference_
Manual.pdf
Data Acquisition Software
It can be the most critical factor in
obtaining reliable, high performance
operation.
Transforms the PC and DAQ hardware
into a complete DAQ, analysis, and
display system.
Different alternatives:
Programmable software.
Data acquisition software packages.

A schematic diagram of Data Acquisition System
Example of Computer DAQ
System
Computer
Timer
Digital Control
Circuit
Trigger
Interrupt
Parallel/Series
Input Port
Parallel/Series
Output Port
A/D
D/A
Filter
+
-
S/H
Sensor
Bridge
Instrumentation
Amplifier
Input
Strobe
Display
Control
Output Strobe
DAQ Board
Multiplexer
Device where computer reads information from
various channel one at a time
Electronic switch
Computer instruct MUX select particular channel
and the data are read and processed
Sample and hold
Take the snapshot of the sensor signal
and hold the value
Switch connect the capacitor and the
capacitor hold the value until the new
sample is acquired
Programmable Software
Involves the use of a programming
language, such as:
C++, Visual C++
BASIC, Visual Basic + Add-on tools (such
as VisuaLab with VTX)
Fortran
C#
Advantage: flexibility
Disadvantages: complexity and steep
learning curve
Data Acquisition Software
Does not require programming.
Enables developers to design the
custom instrument best suited to their
application.

Examples: TestPoint, SnapMaster,
LabView, DADISP, DASYLAB, etc.
KPCI-3108
End of Lecture 18

Vous aimerez peut-être aussi