AD Conversion

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

A/D Conversion and Sampling Rates

Dat Nhan and Raziel Acosta


MAE 170 Experimental Methods Section A02 (Tue. 2:00-5:50PM). Department of Mechanical and Aerospace Engineering, University of California, San Diego. La Jolla, CA 92092 April 13, 2013

Introduction: This experiment was conducted in order to get a better understanding of how a data acquisition card (DAC) works. In order to investigate the properties of a DAC, the resolution was measured by determining the smallest voltage step the computer could generate. Different probable resolutions (N = 12, 16, 18, 24) were measured in order to find when the measured voltage deviated from the calculated value. To further explore the DAC resolution, voltages beginning with 100 mV to 1300 mV with increments of 100 mV were used as inputs in order to see the behavior of the output. The second part of the experiment dealt with sampling a sine wave. The sine wave was sampled at different frequencies in order to observe how the obtained signal behaved. Theory: Certain electronic equipment have analog signals which are not directly compatible with computers (which store and read data digitally). For this matter, a DAC is used to either convert digital information or vice versa as in an analog to digital converter (ADC). How analog signals convert to digital information and vice versa is a bit complex, but what is important to understand for the purposes of this lab is that an analog signal can be chopped into different pieces called bits, and that the resolution of a signal is determined by the absolute value of the difference in voltage divided by the number of bits, as shown in the following equation RESOLUTION = |b a| 2N (Equation 1) The meaning of resolution in this context is the smallest amount of a measurable voltage, so the smaller the resolution value, the smaller voltages that can be measured (smaller is better!). Very small voltage inputs can be generated to prove that a particular DAC resolution in fact reads the smallest voltages its suppose to. Sampling is the action of taking parts of an analog signal to recreate it on a computer while not having to store all the information of the signal, but just enough to keep the integrity of the signal. Sampling rate is the rate at which samples are taken from a given signal. This is important because there is a minimum sampling rate that needs to be used in order to obtain the correct frequency of a signal. This minimum sampling rate is obtain by the Nyquist sampling criterion which is min. sampling rate = 2 * fmax (Equation 2) However, using this minimum sampling rate will still show inaccuracies in the amplitude, so an even greater sampling rate can be used to get a closer approximation of the correct amplitude of the signal. Methods and Procedures: Determining Resolution The first part of the experiment consisted of analyzing the resolution of a DAC. DMM, MyDAQ board, and a computer were connected (Figure 1). A program named generatevolatge.vi was used to generate the analog output. The DC offset was first determined by entering 0V on the program and reading the measured value on the DMM. This value was determined in order to subtract it from future measurements in order to minimize error. The range of the system was then determined by simply increasing the voltage output until the DMM would no longer read a higher value. Similarly, the voltage output was decreased to obtain the minimum voltage. After creating a table for possible resolutions using Equation 1 (the lab manager suggested using values of N = 12, 16, 18, 24), we had the program output the voltages from the smallest resolution up, and observed how the DMM reading changed. After that first task, another program, SteveDMM.vi, was opened which was essentially a digital DMM on the computer. The myDAQ board was rewired so that the output from the computer would be sent back to the computer. An offset value on the SteveDMM was obtained in a similar fashion to the first task. Then, inputs starting at 100 microV to 1300microV with increments of 100 microV were used and the readings for them were obtained from the SteveDMM. A graph from this data was plotted.

Sampling Rates For this part of the experiment, oscilloscope and the function generator were used. Another program, samplingrateNB.vi, was now used to display the sampled signal (Figure 2). The frequency generator was connected to the oscilloscope and to the myDAQ board which was connected to the computer. The oscilloscope was used to verify the desired signal from the frequency generator, and the samplingrateNB.vi program was used to determine the behavior of the sampled signal using different frequencies. The significance of Nyquists theorem (equation 2) was verified.

Results and Discussion: After our careful experimentation, the range was determined to be from -10V to +10V. With our range found and our given N-bit, from equation 1, we found Resolution with respect to each N-bit. From the calculated resolution, we found the actual resolution the DMM displayed, the smallest is 0.2mV which is 16-bit. This accurately matched to the value of 16-bit MyDAQ board. From Generate Voltage.vi, the offset value was determined to be -0.06mV which will be added to the actual resolution at the end of the measurement. (Table 1). In addition, the Digital Acquisition System (DAS) was experimented to determine resolution. The DAS resolution data showed a very slow increase in small increments. (Table 2 and Figure 3). The electrical noise, or offset value is less than 0.1mV, so it is not majorly affecting the actual measurement much. For Sampling rates, difference in the sample frequencies were tested with the signal frequency of 100Hz. Various sample frequencies range from 50Hz, 100Hz, 200Hz, and 1000Hz were tested, and different charts were depicted from those. This highlighted the importance of sampling rates. When sampling at 50Hz, the graph merely showed a line means that the signal is either being under sampled or sampled at the same frequency. As for 100Hz, the signal and sampling frequencies are the same which gave a straight line. When the sampling frequency changed to 200Hz, a depiction of the original 100Hz was presented quite accurate. This turned out to be accurate to Nyquist theorem (Equation 2). When the frequency was changed to 1000Hz, a more accurate sinusoidal graph was depicted. This means that as sampling rate increases, a more accurate depiction of the signal is presented.

Conclusion: The two main purposes of the experiment was achieved. The resolution of the DAC board ranged from -10V to +10V was determined; in this lab, the resolution is 0.26mV for our 16-bit MyDAQ board. In addition, the DAS resolution was also determined with small increments of voltage inputs. Second, the importance of sampling rates was highlighted and Nyquist Theorem assist in comprehending that importance. For a sampling signal, a sampling rate must be at least twice of its frequency to give an original depiction of the sinusoidal graph. As the sampling rate increase, a more accurate sinusoidal graph will appear. Acknowledgements: We would like to thank Mike Watson and Rich Inman for assistance and useful discussion. References:

Tables and Figures: MyDAQ serial: 0x1602699 Determining Resolution: Resolution = |b-a|/2N Offset: -0.06mV N (bit) Calculated Resolution 12 16 18 24 SteveDMM Generated Voltage 100V 200V 300V 400V 500V 600V 700V 800V 900V 1000V 1100V 1200V 1300V

Actual Resolution

4.88 mV 5.08mV 0.305mV 0.2mV 0.0763mV 0.2mV 1.19V -0.06mV Table 1. Resolution of MyDAQ board SteveDMM (mV) 6 Digits display 0.002 0.0018 0.002 0.0018 0.002 0.0018 0.002 0.0022 0.002 0.0023 0.002 0.0023 0.002 0.0025 0.002 0.0025 0.002 0.0025 0.003 0.0028 0.003 0.0029 0.003 0.0029 0.003 0.0031 Table 2. SteveDMM Voltage Readings

Actual Resolution with offset 5.14mV 0.26mV 0.26mV 0V

With Offset .0618mV .0618mV .0618mV .0622mV .0623mV .0623mV .0625mV .0625mV .0625mV .0628mV .0629mV .0629mV .0631mV

DAS Resolution
0.0632 0.063 Output Display(mV) 0.0628 0.0626 0.0624 0.0622 0.062 0.0618 0.0616 0 200 400 600 800 1000 1200 1400 Input Voltage (V)

Figure 3. DAS Resolution

You might also like