You are on page 1of 30

Data Acquisition Boards

Techese - DAQ cards perform D/A and A/D English - Data Acquisition cards (the plug-in board you put in the back of the PC to acquire Electronic signals) perform Data-toAnalog and Analog-to-Digital Conversions. Conceptually: Convert (transduce) measurable quantity (eg. Temperature) into an electrical signal (eg. a Voltage). Signal Conditioning (Signal Processing such as high/ low pass frequency filter to eliminate noise). Convert Voltage into format usable by computer (DAQ card) Analyze info with PC.
Last Updated 3/28/03 Week 10-11 Material

DAQ Signals
Classifying Signals
Signals

Analog

Digital

Frequency Domain

Time Domain

DC

Pulse Train

Off-On

ADC Analysis (Spectrum Analyzer)

Fast A/D Con (Oscilloscope)

Slow ADC/DAC (Motor Shaft)

Counter or Timer (Number of Photons)

TTL Line Drive/ Read from Electronics

Last Updated 3/28/03

Week 10-11 Material

Signal Conditioning
Common Types: Amplification, Transducer Excitation, linearization, Isolation, Filtering Examples: A photodetector produces a voltage between 0 and 50mV. The A/D board has a maximum input voltage of 10 volts with 8 bit resolution.

10/28 = 39 mV resolution

Need to Amplify Signal

Last Updated 3/28/03

Week 10-11 Material

Signal Conditioning - examples


Switching of High Voltages - Use optically isolated switches so that PC is not exposed to High Voltage, ground loop surges, etc. High Voltage
LED powered by DAQ card

Motor

Last Updated 3/28/03

Week 10-11 Material

Signal Grounds
Remember from Phys 121 that Voltages are measured relative to a reference (usually Ground).

Two types of Ground: Earth Ground and Reference Ground


Earth Ground: Potential of earth infinite reservoir of charge (overall neutral). This is the safety or system ground that is used with the three prong AC power cord. A short circuit (eg.) to a toaster chassis will carry the current to earth ground so that the current does not go through a person to ground.

Reference Ground: Return path or signal common. Signal voltages measured relative to this ground.
Last Updated 3/28/03 Week 10-11 Material

Grounded and Floating Signals


When measuring voltages, you can measure then referenced to ground or in a differential mode (floating).
Eg. an Oscilloscope or Function Generator (3 prong AC cord)
Eg. an electrical circuit with a Battery

+ -

Vs

+ -

Vs

Ground
Last Updated 3/28/03

Ground
Week 10-11 Material

DAQ Measurement Configurations


In configuring your DAQ board, you will use one of the three standard categories: Differential Referenced Single-Ended (RSE) Nonreferenced Single-Ended (NRSE)

Differential Method: Neither input is connected to a fixed reference (Ground). Uses Differential Amplifiers which produce a voltage relative to the Analog Input Ground (AIGND) which is the reference ground for the DAQ analog inputs.
Eg. Differential input (A-B) on the SR510 Lock-in Amplifier!
Last Updated 3/28/03 Week 10-11 Material

Differential Method - Configuration

DAQ Card
Coaxial Cable
Last Updated 3/28/03

If bias currents to large (two grounds too different), add 50k resistors from center pins of Coax to AIENSE

Week 10-11 Material

Single End Reference

DAQ Card
Coaxial Cable
Last Updated 3/28/03 Week 10-11 Material

Single End - Non Referenced

DAQ Card
If bias currents to large (two grounds too different), add 50k resistors from center pins of Coax to AIGND
Last Updated 3/28/03 Week 10-11 Material

Why not Double End Reference?

GROUND LOOPS GENERATE NOISE!!!


Last Updated 3/28/03 Week 10-11 Material

Why are Ground loops bad?


They act as Antennas - Faradays Law/ Lenz Law of Induction

Instrumentation detects Ground Loop Voltages

Why use Coaxial (Shielded) cables? Gausss Law - If no net charge enclosed, no electric field One side grounded shield grounds noise from Antenna like pickup

Last Updated 3/28/03

Week 10-11 Material

Nyquist Theorom
How Fast do I need to Sample data? Nyquist - faster than twice the maximum frequency component in the signal to be acquired. Im belligerent and I dont want to! Your data acquisition will have artifacts known as aliasing. Generally, you will need to add a low pass filter to eliminate any frequencies which you can not accurately digitize to prevent aliasing.

Last Updated 3/28/03

Week 10-11 Material

Nyquist is too liberal!!!


1.5 1

0.5 100 points 0 0 -0.5 20 40 60 80 100 120 10 points 4 points

-1

-1.5

Unless you add a low-pass frequency filter before digitization : See Prof. Changs Lecture Notes.
Last Updated 3/28/03 Week 10-11 Material

DAQ Settings:
Analog I/O Analog to Digital Converters (Input to Computer)

Digital to Analog Converters (Output from Computer)


Settings: Typically Configured by Jumper Cables (and software) on DAQ board

ADC Input Range - Unipolar 0V to +10V - Bipolar 5V - Bipolar 10V (note reduced absolute Resolution)
for a 16 bit ADC, the voltage range is divided into 216 parts. ADC Input Mode - Differential, Ground Referenced Single End, Non-referenced single end.
Last Updated 3/28/03 Week 10-11 Material

DAQ Settings - cont.


DAC Reference - Internal (factory setting) or External

DAC Polarity - Unipolar - binary mode, only positive integers


- Bipolar - Twos Complement mode (default)

Connections to DAQ board

User Wiring
DAC1OUT

DAQ Board
Ribbon Cable
Last Updated 3/28/03

Breakout Box

ACH0
AIGND

Week 10-11 Material

Basic Labview DAQ VIs


For Analog Input, there are three basic types of VIs: Easy, Intermediate, and Advanced Single Point Analog Input - Reads a single point as an immediate, non-buffered operation
Analogous VIs for output!

Inputs - Device number (usually 0 unless you have more than 1 DAQ board). Set during DAQ configuration in Windows.
- Channel number to be digitized

Output - Measured voltage

Last Updated 3/28/03

Week 10-11 Material

Buffered Analog Input


The single point measurement VI has limitations: Lots of computation time required when VI called since VI must initialize DAQ board. No sense of timing for successive reads cant control when VI executes!

Better approach is to read successive data points into a predefined BUFFER. Intermediate VIs offer more flexibility for reading in voltage waveforms.
Intermediate Vis: AI Clear, AI Config, AI Read, AI Single Scan AI Start
Last Updated 3/28/03 Week 10-11 Material

Intermediate VIs
Configuration - Inputs are Device and Channel as well as BUFFER size Start - This VI sets the scan rate, the number of scans to acquire, and the trigger conditions. The VI then starts an acquisition. Scan rate is digitization rate: How many values are recorded per second. Number of scans: How many values to read? TOTAL time scan is (number of scans)/scan rate. Trigger conditions: can be configured similar to Oscilloscope.
Last Updated 3/28/03 Week 10-11 Material

Intermediate VIs
Read from BUFFER - Read specified number of points from buffer (or all of them).

Output is Scaled Data - In units of Volts


Frees the DAQ board for use by other applications, deallocates memory for buffer etc. Example VIs at Chain of commands... end of Lecture Task ID

Last Updated 3/28/03

Week 10-11 Material

Error In/Out

For Lazy/ High Level People Like me


High Level Commands - (it slices, it dices, it does work of 4 VIs!!)

Opens Device and Channels, reads values, and Returns values as outputs. (Single point, Multi Channel)
Opens Device and Channels, Read data into buffered array and outputs Buffered array. User Specifies Number of Scans, Scan Rate, Iteration, and Clear Acquisition condition. Same as above, but continuously reads in a circular buffered array.
Last Updated 3/28/03 Week 10-11 Material

Iteration and Clear Acquisition


Iteration is used to optimize operation when you execute this VI in a loop. When iteration is 0 (default), LabVIEW calls the AI Config VI to configure the channel. If iteration is greater than 0, LabVIEW uses the existing configuration, which improves performance. You usually wire this input to an iteration terminal. Example VIs at end of Lecture

Clear Acquisition determines whether the VI clears the task after reading the specified number of scans. You should pass a value of TRUE for this parameter when reading the last set of scans for a given acquisition. The default is TRUE, which means that if you leave this input unwired, the VI reads data only once. You normally wire this input to the terminating condition of a loop, so that when the loop finishes, the VI clears the acquisition.
Last Updated 3/28/03 Week 10-11 Material

Testing out the DAQs


On Desktop (or START button), open up National Instruments Test and Measurement Icon.

Click on Devices and Interfaces - You should see GPIB board, Serial interface (RS232), and DAQ card
Click on DAQ card

Gateway PCs- Lab-PC 1200AI


Old PCs - Lab-PC+ Open up test panels and follow instructions

Connections on Breakout board - connects written on board for Lab-PC+


Last Updated 3/28/03 Week 10-11 Material

Connections - Lab-PC 1200AI

Sample Program - Data Acquisition Sample Program - DAQ example 2


Last Updated 3/28/03 Week 10-11 Material

High level VIs Intermediate level VIs

Introduction to Fast Fourier Transforms

Last Updated 3/28/03

Week 10-11 Material

Examples of FFT for Lab 13


FFT Power Spectrum
Square Wave Generator

Last Updated 3/28/03

Time Domain

Week 10-11 Material

Frequency Domain

FFT - Negative and Pos components


DC frequency
0 .5 0 .4

Nyquist Freq
0 .3 0 .2 0 .1 0 .0 0 .0 5 0 0 .0 1 .0 k

+ Freq

- Freq

Last Updated 3/28/03

Week 10-11 Material

Note with FFT


Spectrum depends on whether input is sine wave, square wave, triangular wave FFT routines usually prefer the number of data points to be powers of 2. FFT routine DOES NOT NEED to know scale of x axis. You need to figure that out on your own! FFT output is the same number of points as the input array. So Frequency spacing of FFT output is f = 1/(total time).
Eg. For a 1000 point array digitized at 1KHz, total time trace is 1 second so each point in FFT spectrum is separated by 1Hz. Frequency resolution depends on time of total trace.

Notice that FFT power peak shifts as number of cycles changes! In FFT example from previous slide. Why? Frequency Changes!!
Last Updated 3/28/03 Week 10-11 Material

Aliasing
Imagine for the FFT VI example that the time duration of the waveform is always 1 second. The Frequency control indicates the frequency of the input signal (in Hz). The Sampling Rate control indicates the digitization rate of the input signal (in Hz). Note that as we use Frequency=10 and decrease sampling rate from 1kHz to 20.01Hz that we always get a 10Hz signal in the power spectrum but other frequencies which depends on the sampling rate. WHAT IS THIS?

Artifact due to Aliasing! When Sampling rate is less than 20, (you can not do it with this example since the SQR wave VI is too smart) a new signal appears BELOW the f/2 Nyquist sampling limit!
Last Updated 3/28/03 Week 10-11 Material

Waveform data Type


The data type of choice for X-Y graphs! Specify t=0

Specify t
Specify voltage array

Behaves as a Cluster data type. Individual Waveforms pallete available for many manipulations of Waveforms.

Last Updated 3/28/03

Week 10-11 Material

You might also like