Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
CHAPTER 1
Transducers, Signals, and Signal Conditioning
Topics
• Data Acquisition Overview
• Transducers
• Signals
• Signal Conditioning
www.ni.com
System Overview
Transducer Overview
Topics
• What is a Transducer?
• Types of Transducers
What is a Transducer?
Physical
Phenomena Signal
Topics
• Types of Signals
• Information in a Signal
– State, Rate, Level,
Shape, and Frequency
Signal Classification
Your Signal
Digital Analog
Digital Signals
Your Signal
Digital
Two possible levels:
• High/On (2 - 5 Volts)
• Low/Off (0 - 0.8 Volts)
Two types of information:
• State
• Rate
Digital Signal Information
Your Signal
Digital
Analog Signals
Your Signal
Analog
Continuous signal
• Can be at any value with
respect to time
Three types of information:
• Level
• Shape
• Frequency (Analysis required)
Analog Signal Information
Your Signal
Analog
Analysis
Required
Signal Conditioning Overview
Topics
• Purpose of Signal Conditioning
• Types of Signal Conditioning
Why Use Signal Conditioning?
+
_ ADC
Lead Wires
Topics
• Types of DAQ Hardware
• Components of a DAQ device
• Configuration Considerations
Data Acquisition Hardware
Your Signal
DAQ Device
Computer
Cable
Terminal Block
50 pin connector
Your Signal
Cable
Terminal Block
• Terminal Block and Cable route your signal
to specific pins on your DAQ device
• Terminal Block and Cable can be a
combination of 68 pin or 50 pin
DAQ Device
20
Increase range: = 4.8 mV
1* 212
10
Increase gain: = 24 mV
100 * 212
Grounding Issues
• To get correct measurements you must properly
ground your system
• How the signal is grounded will affect how we ground
the instrumentation amplifier on the DAQ device
• Steps to proper grounding of your system:
– Determine how your signal is grounded
– Choose a grounding mode for your Measurement System
+
Signal Measurement
VS VM
Source System
-
Signal Source Categories
Signal Source
Grounded Floating
+ +
Vs Vs
_ _
Grounded Signal Source
Signal Source
• Signal is referenced to
Grounded a system ground
– earth ground
– building ground
+
• Examples:
Vs
_ – Power supplies
– Signal Generators
– Anything that plugs into
an outlet ground
Floating Signal Source
Signal Source
• Signal is NOT
referenced to a system Floating
ground
– earth ground
+
– building ground
Vs
• Examples: _
– Batteries
– Thermocouples
– Transformers
– Isolation Amplifiers
Measurement System
• Three modes of +
– Referenced Single-
Ended (RSE)
– Non-Referenced Single-
Ended (NRSE)
• Mode you choose will
depend on how your
signal is grounded
Differential Mode
Differential Mode
• Two channels used for each signal
– ACH 0 is paired with ACH 8, ACH 1 is paired with ACH 9, etc.
• Rejects common-mode voltage and common-mode noise
ACH (n)
+
VS
+
_ ACH (n + 8)
Instrumentation +
Amplifier
AISENSE
_
VM
AIGND
_
Measurement System
RSE Mode
Referenced Single-Ended (RSE)
• Measurement made with respect to system ground
• One channel used for each signal
• Doesn’t reject common mode voltage
ACH (n)
+
ACH (n + 8) +
Instrumentation +
VS
Amplifier
AISENSE
_
VM
_ AIGND
_
Measurement System
NRSE Mode
Non-Referenced Single-Ended (NRSE)
• Variation on RSE
• One channel used for each signal
• Measurement made with respect to AISENSE not system ground
• AISENSE is floating
• Doesn’t reject common mode voltage
ACH (n)
+
ACH (n + 8) +
VS
Instrumentation +
Amplifier
_ AISENSE
_
VM
AIGND
_
Measurement System
Choosing Your Measurement System
Signal Source
Grounded Floating
+ +
Vs Vs
_ _
Topics
• Levels of DAQ Software
• NI-DAQ Overview
• Measurement & Automation
Explorer (MAX) Overview
Levels of Software
User
DAQ
Device
What is NI-DAQ?
• Driver level software
– DLL that makes direct calls to your DAQ device
• Supports the following National Instruments software:
– LabVIEW
– Measurement Studio
• Also supports the following 3rd party languages:
– Microsoft C/C++
– Visual Basic
– Borland C++
– Borland Delphi
What is MAX?
Adequately
Sampled
Signal
Aliased
Signal
Nyquist Theorem
Nyquist Theorem
• You must sample at greater than 2 times the
maximum frequency component of your signal to
accurately represent the FREQUENCY of your
signal
Aliased Signal
Adequately Sampled
for Frequency Only
(Same # of cycles)
100Hz Sine Wave Sampled at 200Hz
Adequately Sampled
for Frequency and
Shape
100Hz Sine Wave Sampled at 1kHz
Data Acquisition Palette
Analog
Output
Digital I/O
Signal
Conditioning
DAQ Channel Name Data Type
• Allows you to use numeric channels
(0, 1, etc.) or virtual channels
• Automatically detects all currently
configured virtual channels
Utility VIs
Single-Point AI VIs
• Perform a software-timed, non-buffered acquisition
+ Good for battery testing, control systems
- Not good for rapidly changing signals due to software timing
AI Sample Channel
– Acquires one point on one channel
AI Sample Channels
– Acquires one point on multiple channels
Multiple-Point (Buffered) AI VIs
• Perform a hardware-timed, buffered acquisition
• Highly recommended for most applications
• Allows triggering, continuous acquisition, different input limits for
different channels, streaming to disk, and error handling
AI Config
– Configures your device, channels, buffer
AI Start
– Starts your acquisition, configure triggers
AI Read
– Returns data from the buffer
AI Clear
– Clears resources assigned to the
acquisition
AI Config
• Interchannel Delay • Buffer Size
– Determines the time (in seconds) – Number of scans the buffer
between samples in a scan can hold
• Input Limits – A scan acquires one sample
– Max and Min values for your signal for every channel you specify
– Used by NI-DAQ to set gain – 1000 scans x 2 channels =
2000 total samples
• Device
• Task ID
– Number of the device (from MAX)
you are addressing – Passes configuration
information to other VIs
• Channels
• Error In/Out
– Chooses what channel(s) you are
addressing – Receives/Passes any errors
from/to other VIs
Different Gains for Different Channels
• AI Config allows different gains for different channels
• The first element of the input limits array corresponds to the
first element of the channel array
Gain = 20 Gain = 2
Range = 0 to +10V
AI Start
• Task ID In/Out
– Receives/Passes configuration information to/from other VIs
• Number of Scans to Acquire
– Total number of scans acquired before the acquisition completes
– Default value (-1) sets # of Scans to Acquire = Buffer Size (AI Config)
– A value of 0 acquires continuously
• Scan Rate
– Chooses the number of scans per second
• Error In/Out
– Receives/Passes any errors from/to other VIs
AI Read & AI Clear
• Number of Scans to Read
– Specifies how many scans to retrieve from the buffer
– Default value (-1) sets # of Scans to Read = # of Scans to Acquire (AI Start)
– If # of Scans to Acquire (AI Start) = 0, default for # of Scans to Read is 100
• Scan Backlog
– Number of unread scans in the buffer
• Waveform Data
– Returns t0, dt (inverse of scan rate), and Y array for your data
Indicator
Terminal
Buffered Acquisition Flowchart
Configure the Clear
Device Resources
Return Data
from the Buffer
Buffered Acquisition
• AI Start begins the acquisition
• Acquisition stops when the buffer is full
• AI Read will wait until the buffer is full to return data
• If error input is true then Config, Start, and Read pass the
error on but don’t execute; Clear passes AND executes
Continuous Acquisition Flowchart
Configure the Return Data
Device from the Buffer
NO
Start the Done?
Acquisition
YES
Display Clear
Errors Resources
Continuous Buffered Acquisition
Differences from a buffered acquisition
• # of scans to acquire = 0
• While loop around AI Read
• Number of Scans to read does not = buffer size
• Scan backlog tells how well you are keeping up
Analog Output Architecture
Channel 0 DAC
Channel 0
Channel 1
Channel 1 DAC
Utility VIs
Single-Point AO VIs
• Perform a software-timed, non-buffered generation
+ Good for generating DC voltages, or control systems
- Not good for waveform generation because software timing is slow
AO Update Channel
– Generates one point on one channel
AO Update Channels
– Generates one point on multiple channels
AO Update Channels
• Device • Values
– Number of the device (from – 1-D array of data
MAX) you are addressing – The first element of
– Ignored if using virtual channel the array corresponds
• Channels to the first channel in
your channels input
– Chooses what channel(s) you
are addressing
– Can either be a number or a
virtual channel name
– Uses the DAQ Channel Name
control
Multiple-Point (Buffered) AO VIs
• Perform a hardware-timed, buffered generation
• Highly recommended for most applications
• Allows continuous generation, triggering, and error handling
AO Config
– Configures your device, channels, buffer
AO Write
– Writes data to the buffer
AO Start
– Starts your generation
AO Wait
– Waits until the generation is complete
AO Clear
– Clears resources assigned to the
generation
Buffered Generation Flowchart
Wait Until
Configure the Generation
Device Completes
NO
Write Data Done?
to the Buffer
YES
Display Clear
Errors Resources
Continuous Generation
Differences from a buffered generation
• number of buffer iterations = 0
• No AO Wait
– AO Wait would hang because the generation never completes
• While loop with AO Write
– The second AO Write is used for error checking ONLY