Você está na página 1de 3

FPGA-Based Data Acquisition System

Ye Fan1
School of Microelectronics and Solid-Sate Electronics University of Electronic Science and Technology of China Chengdu, China
AbstractThis paper is for the purpose of designing a FPGAbased data acquisition system, utilizing the high processing speed feature of FPGA. This system realizes the physical signal acquisition, analog signal to digital signal conversion and data storage. FPGA, as the core of the data acquisition system, collects and stores the data. This system is divided into three modules: the front-end signal processing module, FPGA data acquisition module, and data storage module. The FPGA data acquisition module is designed by the VHDL and simulated by the ISE software. This system has the advantage of being a simple unit with low power consumption and being used to collect data from different sensors. Keywords-Data acquisition system; FPGA; Signal conversion; Data storage; VHDL; Sensor

convert analog signals produced by varied sensors to digital signals and store them on a Personal Computer (PC). The FPGA-based data acquisition system has the features of high processing speed and high accuracy. This system has wide application which includes instrument systems, audio systems, and portable equipment. In the FPGA-based data acquisition system [3][4], the FPGA chip of Xilinx Company works with the Analog-toDigital Convertor (ADC) as the core of this system. In the process of designing inputs, a sensor is used to produce analog signals. In the process of ADC conversion, an eightbit DAC is used to build an ADC. In the process of data acquisition, the control of samplings to DAC conversion will be achieved by programming with Very-High-Speed Integrated Circuit Hardware Description Language (VHDL) [5]. Thus, this system is built both on hardware and software. II. FPGA-BASED DATA ACQUISITION SYSTEM A. OVERVIEW The system consists of three modules: the front-end signal processing module, FPGA data acquisition module, and data storage module. Figure 1 shows a block diagram of the system.

I.

INTRODUCTION

In the scientific and technological research and industrial production, a variety of data are often needed to be collected and processed, such as sound, temperature, pressure, etc. A data acquisition system [1], linking a computer with the outside physical world, is a significant way to obtain information. It can acquire the data from the measured samples. Additionally, data acquisition plays an important role in process control, data detection, and data acquisition. However, a traditional data acquisition system which using a single chip or a digital signal processor (DSP) as a control device has the disadvantage of low processing speed and simple functions. Even though the use of a DSP can realize a high-speed data acquisition, the cost increases as the processing speed goes up. Also, a traditional system consists of discrete devices and complex circuits. Besides, the reliability of a traditional data acquisition system is not high and it is difficult to debug the system. A new data acquisition system implemented using a Field Programmable Gate Array (FPGA) with its high processing speed and high reconfiguration level can solve these problems. A FPGA with its high internal clock frequency, high processing speed, and programmable features, has significant advantages compared with single chip and DSP controllers. Moreover, an FPGA-based data acquisition system can process signals from different kinds of sensors [2], such as a microphone, thermocouple and pressure transducer. An FPGA-based data acquisition system is able to

Fig. 1. Block diagram of FPGA-based data acquisition system.

In this system, a sensor is used to convert physical signals into analog signals. Then, an operational amplifier is used to amplify low amplitude signals produced by a sensor. Next, an analog-to-digital converter (ADC) unit will be implemented using an FPGA. Finally, data from the ADC will be stored into the flash memory of the FPGA or personal computer.

1)

THE FRONT-END SIGNAL PROCESSING MODULE

This module is designed for an operational amplifier to amplify the small analog signals produced by a sensor. As mentioned before, this system can process the physical signals from different kinds of sensors, such as a microphone, thermocouple and pressure transducer. However, the amplitude of the analog signal produced by a sensor is always very low so that an operational amplifier is need to amply these low amplitude signals. In addition, in the process of signal disposal, some ripple waves which are also produced by the sensor and power supply, can impact the accuracy of the data in the later signal disposal procedures. Thus, to solve this problem, a filter is needed to reduce or even eliminate the ripple waves. In this data acquisition system, a proper operational amplifier should be selected to guarantee the voltage of the analog signal keeping from 0 to 10V. This voltage range values will be discussed in section 2. In addition, a proper operational amplifier should also make sure the analog signal undistorted. 2) FPGA DATA ACQUISITION MODULE This module complements the functions of analog signals to digital signals conversion and digital values storage into the flash memory of the FPGA. Figure 2 shows a block diagram of building an ADC. This diagram describes how an ADC is built on an eight-bit DAC and the ADC working principle. Besides, the ADC circuit will be connected to the Xilinx Spartan-3 board to implement the data conversion and storage.

storage. The completed program will be loaded to the Xilinx Spartan-3 Board. The working principle of the block diagram of building an ADC: Va is the outside unknown voltage that needs to be tested. First reset the inside compared analog signal Vb=0V, which has a corresponding digital value 00000000. Then compare the voltage value between Va and Vb. If Vb is less than Va, then the output of comparator will be a positive value. If Vb is larger than Va, then the output of comparator will be almost equal to 0. According to the control logic part, the digital number 00000000 will be added one constantly until its analog value exceeds the Va. Thus, when the output voltage of the comparator changes from positive value to 0, the digital value of the Vb is almost equal to the analog value of Va. Then this final eight-bit digital number of Vb will be stored into the Random-Access Memory (RAM) of the FPGA. Figure 3 shows the schematic diagram for the digital to analog convertor using the DAC0808 integrated circuit. Figure 3 gives the detail circuit connection of the 8-bit DAC block shown in Figure 2.

Fig. 3. Eight-bit DAC application.

As is shown in Figure 3, the reference voltage is 10V. The output analog value of an eight-bit digital input signal can be calculated by formula:
Fig. 2. The block diagram of building an ADC.

Vo = 10V(

In the diagram, the operational amplifier block is wired as a voltage comparator. The eight-bit DAC block shown in Figure 2 is a digital-to-analog convertor. This DAC is built on a DAC0808 IC chip which will be described later. In addition, the control logic and eight-bit Storage Address Register (SAR) in the diagram are implemented on the FPGA board. In this system, the Xilinx Spartan-3 board is selected as the FPGA developing board and the VHDL programs will be written to realize the data conversion and

A1 A 2 A8 + + .... ) 2 4 256

(1)

Thus, the voltage range of the output analog signals is 0~10V. This is the reason why a proper operational amplifier is needed to guarantee the voltage of the analog signal keeping from 0 to 10V which is mentioned before. 3) DATA STORAGE MODULE According to Figure 2, when Vb is almost equal to the value of Va, the final corresponding eight-bit digital number

of Vb will be stored into the RAM of the FPGA at the same time. This procedure is implemented by written the VHDL program on the FPGA. Figure 4 shows the simulation form of the VHDL program to test whether the data are store into the RAM of the FPGA. When ram_read signal changes from 0 to 1, the conversion data which is stored in the RAM of the FPGA will be read out and displayed on the FPGA board through LEDs. Figure 4 shows the value of odata signal changes from ZZ to 59 when ram_read signal changes from 0 to 1. Odata signal is the stored digital value when Vb is almost equal to Va.
Fig. 5. Trangular wave form drawn by Microsoft Excel.

III. CONCLUSIONS The FPGA-based data acquisition system can convert analog signals from a sensor into digital signals through an ADC, which is the most important part of the whole system. Then the data will be sequentially stored in a RandomAccess Memory (RAM) of a PC. An ADC is built on an eight-bit DAC, an operational amplifier, and a comparator. In addition, the FPGA is used to convert and store data. This system has the advantage of being a simple unit with low power consumption and high processing speed. In addition the system can be used to collect data from different sensors. IV. REFERENCE
Fig. 4. Simulation form (When ram_read changes to 1, the stored data will be read out from the RAM). [1] [2] [3] Keithley Instruments, Inc, Data Acquisition and Control Handbook, 2001. R. K. Jurgen. Sensors and Transducers. Warrendale, PA: Society of Automotive Engineers, 1997.Wiley-IEEE Computer Society. 1999. Schlaberg, H. I., Li, D. , Wu, Y. , Wang, M. (2007). FPGA Based Data Acquisition and Processing for Gamma Ray Tomography. AIP Conference Proceedings. 914(1). 831-837. 2007. Thanee, S., Somkuarnpanit, S., Saetang, K.(2010). FPGA-Based Multi Protocol Data Acquisition System with High Speed USB Interface. Proceedings of the International MultiConference of Engineers and Computer Scientists. 2. 2010. Chang, K. C. Digital Systems Design with VHDL And Synthesis: An Integrated Approach.

Finally, the data which are stored in the RAM of the FPGA will be transferred into the RAM of the personal computer through USB interface. B. EVALUATE AND TEST THE SYSTEM To test the system, we use different analog signals produced by the function generator and observe the final data stored in the memory of PC. Then compare data with the original analog signals produced by the function generator. First, we use a function generator to produce a triangular wave, whose voltage amplitude is 5V and its frequency is 10Hz. Through the FPGA-based data acquisition system, this triangular wave was converted into digital signals and stored in the memory of FPGA. Read out 100 sample values from the memory of a PC and use Microsoft Excel to draw the analog wave form. Figure 5 shows the trangular wave form by using Microsoft Excel. Its voltage ranges from 0 to 10V and the wave drawn by the Excel is almost the same as the image of the oranginal trangular wave. Thus, this FPGAbased data acquisition system can work well.

[4]

[5]

Você também pode gostar