Design and Analysis of Intelligent Data Acquisition Card Based on CH375

introduction

Data acquisition is an indispensable part of modern electronic systems. High-quality signal acquisition is required in measurement, manufacturing, and automatic control. Due to the relative maturity of ADC technology and microcontroller technology, interfaces based on PCI and ISA are based. The data acquisition card is widely used in many fields of scientific research and industrial control. Today, with the ever-changing testing technology, the test tasks are more complex and varied, the amount of information that needs to be collected and processed is more verbose, and the interface between the test link and the computer is required to be more seamless and standardized, based on virtual instrument technology (Virtual Instruments) and high speed. The data acquisition of USB 2.0 interface has a wider application prospect and market, and is one of the hotspots of current testing technology research.

With a faster computing speed, a wider number of bits, and a more resource-rich ARM processor as the control core, with the USB 2.0 data transmission and flexible PC software, the new generation of data acquisition cards is no longer limited to a single board. The form can be independent of the computer through the connection line, and meets the high-precision, high-rate, multi-functional test indicators according to the requirements of the test task. At the same time, due to the use of high-performance ARM processor, the control program capacity is increased, which is convenient to realize the independent, intelligent and diversified data acquisition, and get rid of the dependence of the data acquisition system on the computing power of the host computer, thus developing a new intelligent data. Capture card.

1 system principle and block diagram

The block diagram of the entire system is shown in Figure 1. The measured voltage signal is sent to the AD7685 for sampling by pre-conditioning. The AD7685 is driven by the SPI of Atmega48. The double-byte (16 b) data collected by the Atmega48 parallel port is transmitted to the ARM ADuC7026 core twice. When the data acquisition card works in the online state, the PC host software sets the sampling frequency and the channel working mode. After processing, the data is sent to the PC through the USB control chip CH375. When the data acquisition card works in the offline mode, the PC host computer is not needed. Intervention, the data acquisition card is sampled according to the preset sampling frequency and working mode. The sampled data is sent to the U disk through the USB control chip CH375. The system uses ±9 V, +5 V, +3.3 V and analog ground digital ground, and is generated by the DC/DC module, which provides power to each circuit unit through good LC filtering. The Human Machine Interface (HMI) uses simple two-button and LED indications to control the selection and operation of the entire data acquisition card.

2 hardware implementation of data acquisition card

2.1 ADC interface and signal conditioning circuit

To meet the high acquisition accuracy and sampling rate, the design chose the AD7685 as an analog/digital conversion device. The AD7685 is a 16-bit, serial output, 250 KSPS, charge redistribution, successive approximation (PulSAR) ADC. The ADC and the processor are connected by a Serial Peripheral Interface (SPI) interface. To ensure the accuracy of the ADC, a high-speed optocoupler 6N137 isolated driver circuit is used to isolate crosstalk on the processor SPI bus.

The flow of the pre-conditioning circuit signal is shown in the block diagram of the system of Figure 1. In the design, the analog signal is switched by the analog switch ADG1024, and processed by the programmable gain amplifier (PGA) AD8251. The AD8275 is converted by a 16-bit ADC driver with a gain of 0.2, and the signal of ±5 V is converted to 0.25~. The 2.25 V signal greatly expands the measurement range of the data acquisition card, and simplifies the design of the pre-conditioning circuit. The voltage calculation formula is as follows:

The pre-conditioning circuit allows the input signals of different ranges to be amplified or attenuated to within 0.25 to 2.5 V, maximizing the ADC range, so that the four input channels of the acquisition system can have three channels of single channel, two channels, and four channels. Mode, and each channel can be set to any range. The corresponding configuration of the pre-channel is done by the processor ADuC7026, and its configuration follows Table 1.

2.2 EMC measures

The design is powered by an external 9 V switching regulator or USB port. Due to the low cost and high power density of the switching power supply, it is widely used in modern electronic system design, but the electromagnetic interference (EMI) problem is not acceptable. Neglect. At the same time, the ARM7 clocked at up to 45 MHz and must consider its EMI problem. The design tries to select a low-noise amplifier and ADC, following the routing principle of the shortest path, ensuring that the front channel has a lower noise level. In the design, the digital ground/analog ground area is covered with copper and the grounding is used at one point to avoid floating and interference of the analog ground potential in the power supply and digital parts. At the same time, the acquisition card housing is mounted with aluminum foil to prevent external electromagnetic radiation from affecting the operation of the internal circuit.

2.3 USB interface

The design uses the USB control chip CH375, built-in mass storage firmware, can be used as a USB device to transfer data to the PC host computer, and can also be used as a USB host to store data in a USB flash drive. The chip supports the USB 2.0 communication protocol and supports both host mode and device mode in parallel port mode. In order to ensure the stability and integrity of USB high-speed transmission data, the following measures are taken:

(1) Use USB shielded cable as the connection cable to ensure data transmission is free from external electromagnetic interference.

(2) Ensure that the ground wire of the USB port of the computer and the ground wire of the USB control chip CH375 are strictly equipotential.

2.4 ARM system construction

The ADuC7026 is a precision controller based on the ARM7TDMI core. It has 62 KB FLASH, 8 KB RAM and 4 general-purpose timers. It integrates UART, I2C, SPI, DAC, PWM, JTAG port, PLA and many other hardware resources. 40 general I /O pin. The CPU clock is up to 45 MHz and is available in an 80-pin LQFP package. In this design, a complete ARM7 application system including power supply circuit, clock circuit, reset circuit, JTAG program download and debug interface is built. In fact, because the measured external I/O speed of the ADuC7026 is only 4 MHz, in the SPI design, the design adds the Atmega48 microcontroller as a relay to ensure that the control core handles a large amount of information such as USB communication and U disk read/write. Accurate triggering of sampling.

3 programming

3.1 ARM-side programming

The main function of the ARM lower computer software is 3 processes, namely Wait, Online, and Offline. After the data acquisition card is powered on, the Wait process is executed first. The process waits for the key operation, changes the system working mode, and the corresponding subroutine has the corresponding initialization program, button anti-shake program and the like. When the Wait process ends, the system goes into online mode (Online) or offline mode (Offline). The online mode samples according to the user settings, and the data is stored in the CH375 buffer. The CH375 is responsible for transmitting the data to the upper PC. The program flow is shown in Figure 2. Offline mode uses the CH375 mass storage firmware to store data in a USB flash drive. In order to ensure the real-time nature of the acquisition, the controller stores the data in the U disk sector instead of reading/writing in the form of a file, avoiding the delay of complex timing when creating the file. The program flow chart is shown in Figure 3.

3.2 PC-side programming

The upper computer application of the data acquisition card is composed of two parts: a dynamic link library DLL and a client program. The DLL is responsible for communicating with the kernel function USB function driver and receiving various operation requests of the application; the client program is responsible for analyzing and processing the data. It is written in VC++ and follows the input/output interface of the general engineering. It can complete the online collection function of the ordinary data acquisition card. At the same time, it can also store the data collected by the data acquisition card in the U disk and read it through physical sector addressing. Corresponding data collection.

4 Tests and conclusions

The U disk is mounted by the data acquisition card, and the 5 kHz sinusoidal single channel signal is collected, and the U disk data is imported into the host computer to obtain a waveform as shown in FIG. 4, which reproduces the field waveform signal well.

5 Conclusion

Due to the multi-mode USB bus control chip CH375 and the high-speed and low-power ARM7 controller supporting mass storage technology, the data acquisition card has certain intelligent acquisition capability, and can work independently from the upper computer connection limit, and the collected data. Stored in a USB flash drive. It conforms to the development trend of miniaturization, mobilization and intelligence of the new data acquisition system. It is widely used in industrial and outdoor operations, and has high practical value and promotion significance.

Stainless Steel Measuring Spoons Set

HY-STAINLESS STEEL INDUSTRIAL CO.,LTD. , https://www.cnhuangyi.com