IMECS2010 pp1196-1199 PDF
IMECS2010 pp1196-1199 PDF
IMECS2010 pp1196-1199 PDF
AbstractWe have proposed a data acquisition system
with high speed USB interface using FPGA chip as the
main processing unit. Since the FPGA has a number of
modules on chip, which can operate independently, it can
be utilized for the data acquisition system with
multi-channels for the connection to four ADC signals
with four different protocols of Parallel, SPI, I2C and
one-wire protocol. The system is controlled by the
software written in the visual C++. It allows the user to be
able to interface to a PC for data restoration and Figure 1 The overall system diagram.
monitoring. We found that this system can perform data
acquisition with high rate data transfer. Firstly, the PC will check the FPGA for data availability on
the system. After that it will send a set of the instructions to
Index Terms Data acquisition, high-speed USB, FPGA. the FPGA for getting these data from USB port. The data
will be interpreted into separate data bytes for the individual
I. INTRODUCTION
channels. Finally, the data can be shown to the user, and
The data acquisition system is broadly utilized in a saved to the main database at the same time.
number of automatic test and measuring equipments. They
can be used to collect the required data from any peripheral III. PROCESSING UNIT
input devices, such as meters, sensors and etc. via
The processing unit EP1K10TC144-3 from Altera
controlling software [1]. The measured data could be stored
Company is employed for this design. It has 2,880 capacity
in the PC. Their values can be shown numerically whereas
logic elements or about 50,000 gates, 40,960 internal ram bits
their relationship can be displayed graphically as a curve on and 102 input/output ports for connecting to the external
the screen. hardware. It supports the power supply at 3 levels, which are
This paper proposed a design of the data acquisition 5V, 3.3V and 2.5V. The maximum operating frequency is
system using FPGA [2] interfacing to a PC [3]. The system 180 MHz. This design has used VHDL as the language [7, 8]
has capability to receive the digital signals from for writing the code program.
multi-channels sensors with four different ADC protocols. This chip works as the center of the acquisition of the data
from all sensors. Its responsibility is to bridge the signals
II. OVERALL SYSTEM between the ADC inputs to the USB connection, namely, to
The overall system is shown in Figure 1. It presents the send/receive the data with the PC. Figure 2 illustrates the
connection to the four different ADC (analog to digital internal modules within the FPGA chip [6]. These modules
converter) sensors with four different protocols: Parallel, SPI, can be described as below:
I2C and One-Wire. The FPGA collects the individual data A. Parallel Protocol
from all ADC sensors. It processes in the individual
This protocol is the traditional type for most ADCs. It has
protocols. After that it produces a stream of data through the
the advantage of the high speed throughput. This design uses
output USB port [4], which sends these ADC data to the PC.
ADC0820 for the peripheral device. Figure 3 presents the
We have written a specific application program to control
simulation of how the FPGA gets data from this ADC. There
the PC. This program has a function to communicate to the are two main steps in the conversion process:
FPGA so that the PC could prepare itself for the data transfer. The FPGA sends the start signal to activate the ADC
then it will wait for the acknowledge signal.
After finishing the data converting, the ADC will
send the acknowledge signal to the FPGA. Then the
FPGA reads the data from the bus. After that the
Manuscript received December 27, 2009.
S. Thanee is a graduate student in Master Degree in the Faculty of FPGA sends the start signal to activate ADC again for
Engineering at King Mongkuts Institute of Technology, Ladkrabang, getting the data on next read cycle.
Bangkok Thailand. Obviously, this data acquisition is so simple and fast.
S. Somkuarnpanit is now with the Department of Electronics, Faculty of Thus, this protocol should be employed with the high speed
Engineering at King Mongkuts Institute of Technology, Ladkrabang, system.
Bangkok Thailand (e-mail: [email protected]).
K. Saetang is with the Department of Electronics, Faculty of Engineering
at King Mongkuts Institute of Technology, Ladkrabang, Bangkok Thailand
(e-mail: [email protected]).
Figure 3 Simulated communication on SPI protocol. Figure 4 The communications on One-wire protocol.
col. In the other hand it has a good point of using only two
B. Serial Peripheral Interface (SPI) Protocol wires in the data communication.
This protocol was developed by Motorola to accomplish
the easy communication, and to reduce the I/O ports. This D. One-Wire Protocol
design utilizes MCP3201 for building the connection with the This protocol employs only one signal line in the data
FPGA. Figure 4 shows the simulation how the FPGA obtains communication. The bus is not active unless all data have not
the data from this ADC. The procedures of this data been transferred. We used the temperature sensor DS1820 as
acquisition are similar to those of the previous protocol. The the input of this One-Wire acquisition data protocol.
FPGA sends the control signal to activate the ADC, and the The protocol separates the data bit by a time slot. It has a
ADC will send the acknowledge signal back. After finishing length between 60-960 s, depending on the user assignment
data conversion, the ADC will send a signal to inform the and the status of the communication between the master and
FPGA to read the data from its output. The difference from the slave devices. There are four statuses in the protocol:
previous protocol is that the FPGA reads the stream of data in Reset: is used to start the communication.
a serial pattern from the MSB to the LSB, instead. Write data 1 to the slave device.
C. Inter-Integrated Circuit (I2C) Protocol Write data 0 to the slave device.
Read data from slave.
The I2C communication is the protocol, which is designed The first step for this protocol is the reset from the FPGA
to reduce the I/O ports. It requires only two signal wires, (the master device). It sends a reset signal to the bus, and
called SCL and SDA. We use PCF8591 as the ADC with the waits for the acknowledge signal from the sensor (slave
I2C for this design. The procedures of this data acquisition are device). After having received the acknowledge signal, the
quite complicated as following steps: FPGA will send the address command to identify the sensor,
The FPGA sends a signal to activate the bus, and to and starts the data conversion.
identify the address of the device. The FPGA waits for the sensors to process the command.
The FPGA defines the write mode, and sends the Then it sends the reset signal and identifies the device address
command to the ADC that it wants to get the data. again. Consequently, it sends the reading command to the
The FPGA defines the read mode, and identify from sensor to read data from the sensor memory one by one from
which channel it want to read. the LSB to the MSB. Finally, it sends the reset signal to the
The FPGA reads the data from I2C bus. bus and waits for the acknowledge signal. To obtain the next
After this point, the data has been finished reading in one data, the FPGA will process the same steps again. Figure 7
cycle time. Figure 5 illustrates the example of the data reading displays the simulation for the procedures of reset,
by this protocol. We can see that one reading cycle of this acknowledge, and writing data of 1100 1100.
protocol takes time more than that of the previous proto-