Design and implementation of multi-channel data acquisition system based on W77E58

Publisher:EnchantedMelodyLatest update time:2012-12-31 Source: 电子设计工程 Keywords:W77E58 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
In the field of modern industrial production, control and scientific research, the collection, transmission and processing of various field data such as temperature, pressure and vibration are essential components. The process of converting analog information such as temperature, pressure, flow, displacement into digital information and then storing, processing, displaying or printing it by computer is data acquisition, and the corresponding system is called data acquisition system. The high-performance microcontroller W77E58 has the advantages of low power consumption, small size and powerful functions, which is very suitable for real-time collection and field control of field data.

1 Structural design of acquisition system
The data acquisition system is mainly composed of several modules such as sensors, conditioning circuits, A/D conversion circuits, microcontrollers, communication modules, computers (PCs), etc. As shown in Figure 1. Various parameters of the external world, field, etc. are analog quantities. The function of the sensor is to convert these analog quantities into electrical signal analog quantities (which can be voltage, current, or electric pulses). After appropriate conditioning circuits, these electrical signal analog quantities are sent to the analog-to-digital converter (A/D converter), which converts these analog quantities into digital signals that can be recognized and processed by the microcontroller. Finally, through the communication module, the microcontroller transmits the collected signals to the PC. The PC human-machine interface is responsible for controlling, storing and processing the collected data.

a.JPG


In practical applications, since the output signals of sensors are mostly weak signals and the distance between the signals and the acquisition system is relatively long, current signal transmission is used to prevent serious signal attenuation. At the signal receiving end, the signal is restored to a voltage signal through an I/V conversion circuit, and then sent to an A/D converter after amplification, filtering and other conditioning circuits. The structural block diagram is shown in Figure 2.

b.JPG [page]

2 System Hardware Design
2.1 I/V Conversion Circuit Design
In order to reduce the noise of the resistor itself and the influence of the environment, a 40 ohm 1% precision small resistor is used to convert the 4-20 mA current signal into a 0.144-0.72 V voltage signal. As shown in Figure 3, capacitor C1 is used to filter out high-frequency noise.

c.JPG


2.2 Collection circuit design
For each collection object, it must be converted into a digital quantity through an analog-to-digital converter. When there are many input signals, a multi-way analog switch is needed to connect multiple analog quantities to the analog-to-digital converter in turn for conversion. The multi-way analog switch used in this design is CD4051, and the A/D converter uses the MAX197 chip of the American MASIM company. MAX197 adopts a line-by-line approximation working mode, and the internal input tracking/holding circuit converts the analog signal into a 12-bit digital output.

d.JPG


Figure 4 is a circuit diagram of an analog signal of the acquisition system entering the microcontroller after passing through the filter circuit, multi-way selection switch and A/D conversion. The P0 port of the single-chip computer W77E58 is connected to D0~D7 of MAX197, which is used to input the initialization control word of MAX197 and to read the conversion result data. P2.4 of the W77E58 single-chip computer is used as the chip select of MAX197. MAX197 is selected as the software setting low power working mode, so the SHDN pin is set to a high level. The internal reference voltage is used, so REFADJ and REF are both connected to a low level. The P2.6 pin of the W77E58 single-chip computer is used as the selection line for judging high and low data. It is directly connected to the HBEN pin. h.jpg The pin of MAX197 is connected to P2.5 of W77E5S8, and becomes low when the conversion is completed and the output data is ready to be read h.jpg . In the circuit, AGND and DGND should be independent of each other, and 0.1μF capacitors should be used between various power supplies and analog ground to eliminate power supply ripple.

[page]

3 System software design
The design of analog quantity acquisition program is mainly divided into three stages. The first stage is the design of A/D conversion driver, the second stage is the design of analog quantity digital filtering program, and the third stage is the design of A/D conversion result processing program.
3.1 A/D conversion driver design
The MAX197 chip in the hardware circuit is used to collect analog quantity. The MAX197 control word format is shown in Table 1.

e.JPG


A2, A1, A0 select one of the 8 analog channels through different 0, 1 combinations; RNG and BIP 0, 1 combination determines the range of the collected analog, the maximum is ± 15 V; ACQMOD determines whether MAX197 uses internal acquisition mode or external acquisition mode; PD0 and PD1 combination determines whether to select normal working mode or low power mode. The specific procedures are as follows:
g.JPG

[page]

g.JPG
3.2 Digital filtering
To ensure the accuracy of data acquisition results, the results of analog A/D conversion need to be digitally filtered. The median average filtering method is used in program design. Each analog quantity is sampled n times continuously, the sum of the n sampling results is calculated, the maximum value xmax and the minimum value xmin are removed, and then the average value of the remaining n-2 numbers is calculated as the actual value of the analog quantity.
3.3 Correction of acquisition results
The reference value of the analog quantity is the actual operating parameter, so the collected data needs to be corrected to the actual value through a certain transformation relationship, and then the state judgment operation is performed.

4 Conclusion
The multi-channel data acquisition system designed by the author can realize real-time monitoring of multi-channel signals, and can transmit data to the computer through the serial port and display it. This system can be equipped with different sensors and corresponding processing circuits when applied. With a little modification, it can be widely used in many fields, so it has high practicality.
Keywords:W77E58 Reference address:Design and implementation of multi-channel data acquisition system based on W77E58

Previous article:Circuit Design of Data Acquisition System Based on USB Interface
Next article:Research progress on bus detection technology

Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号