Download lab6 materials
You will be using the miniLAB 1008 data acquisition system. The miniLAB 1008 features eight 12-bit analog input signal connections and two analog output signal connections. It is powered by the +5 volt USB supply. No external power is required.
This data acquisition system is part of our plans for the integrated engineering core curriculum.
The miniLAB 1008 has an accompanying cdrom with supporting software and standalone applications. MATLAB has a mcc driver that recognizes the miniLAB 1008, but you still have to install the supporting software (but not TracerDAQ).
MATLAB supports a variety of data acquisition systems in the Data Acquisition Toolbox. To perform any task with your data acquisition application, you must call M-file functions from the MATLAB environment. Among other things, these functions allow you to:
As you make electrical measurements, whether by a multimeter or an oscilloscope, you often observe that the least significant digit (or more) fluctuates over time. This is true of samples from an A/D converter, even if the input is a constant DC value. Below is a histogram of values obtained from repeated samples of a constant voltage.
In a complete test, you should plot samples as a function of time and look for any systematic trends. Assuming there are no apparent trends, the remaining fluctuations are considered noise. The width of the distribution (spread of values) measures the amount of noise.
In addition, we note that the values are quantized. There are distinct groups of values. The quantization step is related to the resolution of the A/D converter. If there are N bits, then there are 2N distinct values and 2N-1 distinct steps. The step size is the total range in volts, divided by the number of steps. If you know the step size, you can work backwards to the number of steps and then the number of bits.
The sampling theorem says that if you sample faster than the Nyquist rate (twice the maximum frequency present in the signal) and you sample for a very long time (approaching infinity), then you can reconstruct the original continuous signal by sinc interpolation.
If, as is often the case, you have only a relatively small number of samples, applying sinc interpolation leads to Gibb's phenomenon oscillations. A better interpolation method, suitable for a limited range of samples, is spline interpolation. MATLAB has an interpolation function interp1.m for which spline interpolation is an option.
The diagram below shows a continuous sinusoid (dashed blue plot) whose frequency is close to the Nyquist frequency. The available samples are shown with circular markers. The solid black curve shows the result of using spline interpolation to generate intermediate values.
The resulting reconstruction is not bad, but it is distinctly not sinusoidal. Here is the MATLAB script for this calculation.
Maintained by John Loomis, last updated 15 April 2009