Download presentation
Presentation is loading. Please wait.
1
EET 2259 Unit 12 Data Acquisition
Read Bishop, Chapter 8. Lab #12 and Homework #12 due next week.
2
Data Acquisition The textbook’s Chapter 8 covers several kinds of material: Data acquisition hardware (Sections 8.1 to 8.5): Not much on LabVIEW in these sections. LabVIEW data acquisition without the DAQ Assistant (Sections 8.6 to 8.8): This is how you had to do it before LabVIEW version 7.0, and how some people still prefer to do it. LabVIEW data acquisition using the DAQ Assistant (Sections 8.9 to 8.12): You’re already familiar with much of this.
3
Data Acquisition Hardware
Outline: Components of a DAQ System (§8.1) Types of Signals (§8.2) Transducers and Signal Conditioning (§8.3) Signal Grounding and Measurements (§8.4) Analog-to-Digital Conversion (§8.5) Each of these topics could occupy us for a week, so we’ll just hit the high points. For lots more detail, see NI’s website: LabVIEW Measurements Manual Measurement Fundamentals Main Page The textbook borrows heavily from these documents on NI’s site.
4
Components of a DAQ System (§8.1)
Image from NI’s website
5
Types of Signals (§8.2) Image from LabVIEW Measurements Manual
6
Transducers and Signal Conditioning (§8.3)
A transducer (or sensor) is a device that converts a physical quantity (such as temperature, pressure, light intensity, …) to an electrical signal (voltage or current).
7
Some Common Transducers
Image from LabVIEW Measurements Manual
8
Signal Conditioning In many cases the electrical signal coming from the transducer must be conditioned in some way before it is converted into digital format for use by the computer. Examples of signal conditioning include: Amplifying a weak signal Filtering out noise from the signal
9
Signal Conditioning For Some Transducers
Image from LabVIEW Measurements Manual
10
Signal Grounding and Measurements (§8.4)
Signal sources can be either: Grounded (also called referenced) Floating (also called non-referenced)
11
Grounded Signal Source
Example of a grounded signal source: Function generator or power supply whose negative terminal is tied to earth ground through the power cord. Image from LabVIEW Measurements Manual; see also Figure 8.17 in textbook (p. 417).
12
Floating Signal Source
Examples of floating signal sources: Our red trainer’s function generator or power supply, whose negative terminal is not tied to earth ground through the power cord. Battery-powered devices Transformers Thermocouples Image from LabVIEW Measurements Manual ; see also Figure 8.17 in textbook (p. 417). Have them use a DMM to check this for the Tek func generators and the trainer’s func generators.
13
Measurement System Configuration
Measurement systems can be configured as either: Differential Referenced Single-Ended (RSE) Non-Referenced Single-Ended (NRSE) The PCI-6221 cards inside our computers can be configured in any of these modes. The myDAQ can only be configured in differential mode. Have them place a DAQ Assistant, configure it for analog voltage input, and look at options for terminal configuration on both myDAQ and PCI-6221.
14
Differential Measurement System
Image from LabVIEW Measurements Manual; see also Figure 8.20 in textbook (p. 419).
15
Referenced Single-Ended (RSE) Measurement System
Image from LabVIEW Measurements Manual ; see also Figure 8.22 in textbook (p. 420). Recommend that they draw in the junctions in Figure 8.22 on page 420.
16
Non-Referenced Single-Ended (NRSE) Measurement System
Image from LabVIEW Measurements Manual; see also Figure 8.23 in textbook (p. 420).
17
Matching Signal Grounding to Measurement Configuration
Image from LabVIEW Measurements Manual; see also Figure 8.24 in textbook. See also pages of NI myDAQ User Guide and Specifications. See also NI tutorial on Ground Loops and Returns.
18
Matching Signal Grounding to Measurement Configuration (Cont’d.)
This is why we need a wire between the myDAQ’s AI0- and AGND terminals when we use the myDAQ to measure voltages generated by the red trainer, but not when we use it to measure voltages generated by the myDAQ. The red trainer’s power supply is a floating signal source. The myDAQ’s analog out terminal is a grounded signal source. This is why when doing analog input to the myDAQ from the red trinaer’s power supply, we’ve connected the – terminal to analog ground (a 0-ohm “resistor”).
19
Analog-to-Digital Conversion (§8.5)
Before a computer can process analog information, we must first use an analog-to-digital converter (ADC) to transform the analog values into digital binary values.
20
Sampling Rate The ADC periodically samples the analog signal, and converts each sampled value of the analog signal into a binary code. An ADC’s sampling rate tells how often the circuit “takes a snapshot” of the signal being digitized. It’s expressed either as number of samples per second or as a frequency. Example: 1000 samples/sec or 1 kHz.
21
Number of Bits and Resolution
The more bits that are used to represent the value of each sample, the better the ADC’s resolution is. Better resolution results in a more accurate representation of the original signal. Most ADCs use at least 8 bits.
22
Number of Bits and Resolution (Cont’d.)
As an illustration, the following slides (from Floyd’s Digital Electronics) show how using 4 bits results in much better resolution than using 2 bits. With only 2 bits, each sampled value must be lumped into one of 4 “buckets.” With 4 bits, we have 16 “buckets.” An 8-bit ADC would have 256 “buckets.”
23
Figure 12. 8 Light gray = original waveform
Figure Light gray = original waveform. Blue = Reconstructed waveform using four quantization levels (2 bits).
24
Figure 12. 10 Light gray = original waveform
Figure Light gray = original waveform. Blue = Reconstructed waveform using sixteen quantization levels (4 bits).
25
Resolution There are several common ways of specifying an ADC’s resolution: Number of bits, n Number of output codes, = 2n Step size (which Bishop calls code width), = Vref / 2n
26
Resolution: Examples n 4 2n 16 Vref / 2n 312.5 mV Formula 4-bit ADC
Number of bits n 4 Number of output codes 2n 16 Step size (assuming 5 V reference voltage) Vref / 2n 312.5 mV
27
Specs for Our Equipment
Let’s find the sampling rate and resolution for the ADCs inside our equipment. NI myDAQ User Guide and Specifications NI PCI-6221 Specifications
28
LabVIEW Data Acquisition without the DAQ Assistant (§§8.6 – 8.8)
Before the DAQ Assistant was introduced, LabVIEW programmers had to use the functions on the Measurement I/O > NI-DAQmx palette to perform data acquisition. This was a lot more work than using the DAQ Assistant, but some programmers still do it this way.
29
Express VIs Express VIs (the DAQ Assistant is one example) were introduced in LabVIEW 7.0. They provide user-friendly ways to do things that you could also do using other LabVIEW functions and subVIs.
30
Seeing the Code Hidden Inside an Express VI
You can convert an Express VI to standard LabVIEW code by right-clicking and selecting “Open Front Panel.” In the case of a DAQ Assistant, you can also right-click and select “Generate NI-DAQmx Code.” Demo with a Delay Time Express VI and with a DAQ Assistant. Do them both using “Open Front Panel.”
31
LabVIEW Data Acquisition with the DAQ Assistant (§§8.9 – 8.12)
You already know much of what is discussed in these sections, since you’ve been using the DAQ Assistant since the start of this class. Read these sections to review and strengthen your knowledge.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.