Design of Multi-channel Data Acquisition System Based on MSP430 MCU

Data acquisition is the process of obtaining object information from one or more signals. With the rapid development and popularization of microcomputer technology, data acquisition and monitoring has become an increasingly important detection technology, which is widely used in industry and agriculture and other occasions that need to monitor temperature, humidity and pressure at the same time. Data acquisition is an important link in industrial control and other systems. It is usually implemented by some single-chip microcomputer systems with relatively independent functions. As an indispensable part of the measurement and control system, the performance characteristics of data acquisition directly affect the entire system.

1 Introduction

Data acquisition is the process of obtaining object information from one or more signals. With the rapid development and popularization of microcomputer technology, data acquisition and monitoring has become an increasingly important detection technology, which is widely used in industry and agriculture and other occasions that need to monitor temperature, humidity and pressure at the same time. Data acquisition is an important link in industrial control and other systems. It is usually implemented by some single-chip microcomputer systems with relatively independent functions. As an indispensable part of the measurement and control system, the performance characteristics of data acquisition directly affect the entire system. The multi-channel data acquisition system designed in this paper adopts the MSP430 series single-chip microcomputer as the core control element of the MCU board. The MSP430 series of single-chip microcomputers are 16-bit single-chip microcomputers developed by TI. Its outstanding feature is that it emphasizes ultra-low power consumption, which is very suitable for various occasions with low power requirements. The sampling circuit of the system adopts the 12-bit A/D inside the MSP430 microcontroller, which makes the system have the characteristics of simplified hardware circuit and low power consumption. Due to the high performance-price ratio of this series, the application is becoming more and more extensive.

2 The basic composition and working principle of the system

In the design of this data acquisition system, in order to improve the intelligence, reliability and practicability of the system, the method of single-chip MCU and host computer transmission is adopted, that is, the MCU runs at the far end of the data acquisition system to complete data acquisition, processing, and transmission. and Display, the host computer completes the data reception, verification and display, and the host computer can control the remote MCU, so that the acquisition mode can be selected. The MCU uses TI’s low-power MSP430F437, which is much more powerful than the 80C51. It not only has 8 channels of 12-bit A/D, but also has an LCD driver, which saves a lot of peripheral circuits. The system simulates a sine wave signal and other 6-channel voltage division signals on site for multi-channel sampling. The ICL8038 precision signal generation chip is used to generate a frequency-variable sine wave, and then the LM331 chip realizes the frequency-to-voltage conversion. The signal also needs to be conditioned to meet the system requirements.

3 System hardware circuit design

The overall block diagram of the system hardware is shown in Figure 1. The system consists of two boards, the analog board and the MCU board. The analog board includes the system power supply, the sine wave signal generation module, the frequency-to-voltage conversion module, the signal conditioning module and the 7-way A/D interface; the MCU board includes the power supply and A/D. Interface, MCU, LCD and serial transceiver module.

Design of Multi-channel Data Acquisition System Based on MSP430 MCU
Figure 1 Overall block diagram of system hardware

3.1 Sinusoidal signal generation module

The sine signal generation module mainly uses the integrated function generator ICL8038. The ICL8038 function generator is a monolithic integrated circuit chip made of advanced technology such as Schottky barrier diodes. It has the advantages of wide power supply voltage range, good stability and high precision. It can work with only a few components connected externally, and can generate square wave, triangle wave and sine wave at the same time. The ICL8038 and its peripheral circuits are shown in Figure 2. The external control voltage is input from pin 8, and the frequency of the sine wave signal output from pin 2 can be changed by adjusting the potentiometer P1 to realize external voltage-controlled oscillation. Connect a 0.01 μF oscillating capacitor between pins 10 and 11, and connect a resistor and a potentiometer between pins 4 and 5 to adjust the sine wave distortion.

Design of Multi-channel Data Acquisition System Based on MSP430 MCU
figure 2

3.2 Frequency-voltage conversion module

The design of frequency-to-voltage conversion module adopts integrated chip LM331, LM331 adopts a new temperature-compensated energy-gap reference circuit, and has extremely high accuracy in the entire operating temperature range and as low as 5.OV power supply voltage. The dynamic range of LM331 is wide, up to 100 dB; the linearity is good, the maximum nonlinear distortion is less than 0.01%, and the operating frequency is as low as 0.1 Hz, and the linearity is good; the conversion accuracy is high, and the digital resolution can reach 12 bits ;The external circuit is simple, only need to connect a few external components to easily form a V/F or F/V conversion circuit, and it is easy to ensure the conversion accuracy. The designed frequency-voltage conversion circuit in this system is shown in Figure 3.

Design of Multi-channel Data Acquisition System Based on MSP430 MCU
image 3

Adjust P1 to make Rs about 12.8 kΩ, then when fi=200 Hz, Vo=0.22 V; when fi=2 kHz, Vo=2.22 V.

3.3 Signal conditioning module

The signal conditioning module includes a signal amplification and shaping circuit and a signal amplification and conditioning circuit. Figure 4 is a signal amplification, shaping and conditioning circuit designed with A/D824. In Figure 4(a), the sine wave signal generated by ICL8038 is first high-pass filtered by a 1 μF capacitor, then reversely amplified by A/D824 by 2 times, and then passed through a comparator to output a square wave signal of the corresponding frequency as the input of LM331. After the square wave signal of 200 Hz to 2 kHz passes through the LM331 frequency-voltage conversion chip, the generated signal Vo is 0.22 to 2.22 V. In order to conform to the fact that 200 Hz to 2 kHz corresponds to 1 to 5 V, it is necessary to adjust Vo. The operation circuit in the scheme is shown in Fig. 4(b).

Design of Multi-channel Data Acquisition System Based on MSP430 MCU
Figure 4(b) Operational circuit

3.4 System Power Module

The system is powered by ±12 V DC power supply, which is directly supplied to ICL8038, LM331 and A/D3824. The input +12 V voltage is passed through the LM317 adjustable three-terminal voltage regulator to generate +5 V voltage, and other O, 1 V, 2 V, 3 V, 4 V, 5 V, a total of 6 channels of data supply A/D sampling, the microcontroller board needs +3.3 V power supply, which can be generated by +5 V through another LM317. In order to reduce power supply noise, filter capacitors are added to each power supply, generally a combination of 10 μF and 0.1 μF capacitors.

3.5 MCU module

This system mainly uses the following performance characteristics of MSP430 single-chip microcomputer: low operating voltage, ultra-low power consumption, 8-channel 12-bit A/D converter, and the ability to drive liquid crystal can reach 160 segments, etc., so that the hardware circuit can be simplified. The single-chip microcomputer and peripheral circuits are shown in Figure 5, which is the circuit schematic diagram of the system MCU board. The 3.3 V DC voltage is generated by 5 V power supply through LM317 to supply power to MSP430. The single-chip microcomputer is responsible for collecting the voltage data of 7 channels and displaying the corresponding voltage value on the LCD. At the same time, the single-chip microcomputer and the host computer carry out serial communication, and the communication method adopts the standard RS 232. The RS 485 differential interface can also be used to improve the communication speed and distance, but it is necessary to add a 485-232 conversion chip in front of the host computer, which is slightly complicated. Therefore, RS232 can meet the system requirements, which is simple and practical.

Design of Multi-channel Data Acquisition System Based on MSP430 MCU

The sampling mode of the microcontroller can be controlled by the host computer, namely 2 modes of cyclic acquisition and fixed channel acquisition, which realizes remote controllable data acquisition.

4 System software design

The system is written in C language, and the functions include: 7-channel A/D sampling, LCD display and serial port transceiver, among which 7-channel A/D sampling can be controlled by the upper computer sampling mode, that is, cyclic sampling and fixed channel sampling, LCD display sampling value and the corresponding channel number, the system communicates with the host computer through the serial port.

4.1 Software flow chart

Figure 6 is the main flow chart of the system software.

Design of Multi-channel Data Acquisition System Based on MSP430 MCU
Figure 6 The main flow chart of the system software

After the system is powered on, initialize each module, including: A/D module, timer A, watchdog, LCD and serial port. Then judge the sampling mode, conduct sampling and display, the default sampling mode of the system is 7-channel cyclic sampling.

5 Conclusion

This system is a multi-channel data acquisition system based on MSP430 single-chip microcomputer.

This system has the following features:

(1) The system uses the integrated function generator ICL8038 to generate a sine signal, which is used to simulate the data that needs to be collected in the field, and the generated analog signal has high precision.

(2) The system adopts MSP430 single-chip microcomputer with low power consumption and powerful functions. MSP430 single-chip microcomputer is equipped with 8 external channels and 12-bit A/D, which can realize multi-channel data acquisition with high precision, and can simultaneously collect 7 channels of data and the acquisition method controllable. The internal 12-bit A/D of the single-chip microcomputer is adopted to simplify the system hardware circuit.

(3) RS 232 standard interface is used for communication between the single-chip microcomputer and the host computer in the system, and RS 485 differential mode can also be used for transmission to improve the communication speed and transmission distance.

In this system, the MSP430 single-chip microcomputer is responsible for collecting, processing and displaying the 7-channel data, and at the same time responding to the commands of the host computer; the host computer faces the user, can control the system, and send commands to the single-chip microcomputer to select the method of data acquisition.

The system can realize the acquisition of 7 channels of analog signals, and the acquisition accuracy is high, which can meet the application of general occasions.

The Links:   FF400R06KE3 QM200HA-HK