Design of multi-channel data acquisition system based on MSP430 microcontroller

Publisher:量子心跳Latest update time:2007-02-06 Source: 现代电子技术Keywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
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 collection and monitoring has become an increasingly important detection technology, and is widely used in industry and agriculture and other occasions where temperature, humidity and pressure need to be monitored simultaneously. Data acquisition is an important link in industrial control and other systems. It is usually implemented using some microcontroller 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 article uses MSP430 series microcontroller as the core control component of the MCU board. The MSP430 series of microcontrollers is a 16-bit microcontroller developed by TI. Its outstanding feature is its emphasis on ultra-low power consumption, which is very suitable for various occasions with low power requirements. The sampling circuit of this system uses 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, its applications are becoming more and more widespread.

2. Basic composition and working principle of the system.

In the design of this data acquisition system, in order to improve the intelligence, reliability and practicality of the system, the single-chip MCU and host computer transmission method is adopted, that is, the MCU runs at the remote end of the data acquisition system. Complete the collection, processing, sending and display of data, and the host computer completes the reception, verification and display of data. At the same time, the host computer can control the remote MCU to make its collection method optional. The MCU uses TI's low-power MSP430F437, which is much more powerful than the 80C51. It not only has 8-channel 12-bit A/D, but also has an LCD driver, which saves a lot of peripheral circuits. This system simulates a sine wave signal and other 6 divided voltage signals on site for multi-channel sampling by the system. It uses the ICL8038 precision signal generation chip to generate a sine wave with variable frequency, and then uses the LM331 chip to realize the conversion from frequency to voltage. The signal also needs to be conditioned to meet system requirements.

3 System hardware circuit design

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

3.1 Sinusoidal signal generation module

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

3.2 Frequency and voltage conversion module

The frequency and voltage conversion module is designed using the integrated chip LM331. LM331 adopts a new temperature compensation bandgap reference circuit, which can operate within the entire operating temperature range and as low as 5. Extremely high accuracy under OV supply voltage. The dynamic range of LM331 is wide, up to 100 dB; the linearity is good, and the maximum nonlinear distortion is less than 0. 01%, the operating frequency is as low as 0.1 Hz and has good linearity; the conversion accuracy is high, and the digital resolution can reach 12 bits; the external circuit is simple, and only a few external components are needed to easily form the V/F Or F/V and other conversion circuits, and it is easy to ensure the conversion accuracy. The frequency-to-voltage conversion circuit designed in this system is shown in Figure 3.

Just adjust P1 so that R s is about 12.8 kΩ, then when f i =200 Hz, V o =O. 22 V; when f i =2 kHz, V o =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 shows the signal amplification, shaping and conditioning circuit designed using 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 2 times by A/D824, and then passed through a comparator to output a square wave signal of corresponding frequency as the input of LM331. After the square wave signal of 200 Hz ~ 2 kHz passes through the LM331 frequency voltage conversion chip, the signal Vo generated is O. 22~2.22 V. In order to comply with 200 Hz~2 kHz, which corresponds to 1~5 V, Vo needs to be adjusted. The operation circuit in the scheme is shown in Figure 4(b).

3.4 System power module

The system uses ±12 V DC power supply, which directly supplies ICL8038, LM331 and A/D3824. The input +12 V voltage passes through the LM317 adjustable three-terminal voltage regulator to generate a +5 V voltage, which is divided by resistors. The voltage generates other O, 1 V, 2 V, 3 V, 4 V, 5 V, a total of 6 channels of data are supplied to the A/D sampling. The microcontroller board requires +3.3 V power supply, which can be obtained by generating +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 is used.

3.5 Microcontroller module

This system mainly uses the following performance characteristics of MSP430 microcontroller: low operating voltage, ultra-low power consumption, 8-channel 12-bit A/D converter, LCD driving capability up to 160 segments, etc., which makes the hardware circuit simple change. The microcontroller and peripheral circuits are shown in Figure 5, which is the circuit schematic diagram of the system MCU board. The 5 V power supply generates 3.3 V DC voltage through LM317 to power the MSP430. The microcontroller is responsible for collecting the voltage data of 7 channels and displaying the corresponding voltage values ​​on the LCD. At the same time, the microcontroller and the host computer conduct serial communication. The communication method adopts standard RS 232 mode, RS 485 differential mode interface can also be used to improve communication speed and distance, but it needs to add a 485-232 conversion chip in front of the host computer, which is a bit complicated, so using RS232 can meet the system requirements, which is simple and practical.

The sampling mode of the microcontroller can be controlled through the host computer, that is, there are two modes of cyclic acquisition and fixed channel acquisition, realizing remote controllable data acquisition.

4 System software design

This system is written in C language. The functions include: 7-channel A/D sampling, LCD display and serial port transceiver. Among them, 7-channel A/D sampling can be controlled by the host computer in the sampling mode, that is, cyclic sampling and fixed channel sampling. , the LCD displays the sampling value and the corresponding channel number, and 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.

After the system is powered on, each module is initialized, including: A/D module, timer A, watchdog, LCD, serial port, etc. Then determine the sampling mode, perform sampling and display, the system default sampling mode is 7-channel cyclic sampling.

5 Conclusion

This system is a multi-channel data acquisition system based on MSP430 microcontroller. The system uses the microcontroller to communicate with the host computer to realize the remote control function.

This system has the following characteristics:

(1) This system uses the integrated function generator ICL8038 to generate a sinusoidal signal, which is used to simulate the data that needs to be collected on site. The generated analog signal has high accuracy.

(2) The system uses the low-power, powerful MSP430 microcontroller. The MSP430 microcontroller is equipped with 8 external channels of 12-bit A/D, which can realize multi-channel data collection with high accuracy. It can collect 7 channels of data at the same time and the collection method is controllable. Using the 12-bit A/D inside the microcontroller simplifies the system hardware circuit.

(3) The single-chip computer and the host computer in the system use the RS 232 standard interface for communication, or the RS 485 differential mode for transmission to improve the communication rate and transmission distance.

In this system, the MSP430 microcontroller is responsible for collecting, processing and displaying 7-channel data, and at the same time responding to the host computer commands; the host computer is user-oriented and can control the system and send commands to the microcontroller to select the data collection method.

This system can realize the collection of 7 analog signals with high collection accuracy and can meet the application of general occasions.

Keywords:MCU Reference address:Design of multi-channel data acquisition system based on MSP430 microcontroller

Previous article:Studying transient processes using microcontroller data acquisition system
Next article:Design of multi-channel data acquisition system based on MSP430 microcontroller

Recommended ReadingLatest update time:2024-11-16 16:34

Detailed explanation of MCU SPI bus timing
 SPI bus is a three-wire synchronous interface introduced by Motorola. It communicates in a synchronous serial 3-wire mode: a clock line SCK, a data input line MOSI, and a data output line MISO. It is used for full-duplex, synchronous serial communication between CPU and various peripheral devices. The main features o
[Microcontroller]
Detailed explanation of MCU SPI bus timing
A simple program to test the integer performance of the microcontroller
void Calculate() { unsigned long x; unsigned char a; a=1; for(x=0;x 4294967294;x++) { a=a+1; } } void main() { P1_0=0; //Light up to start calculation Calculate(); P1_0=1; while(1); }   This calculation took 32:26'30'' on my 48M STC12C5A60S2 and 10 seconds on my computer (Linux ELF n
[Microcontroller]
Several delay programs for 51 single chip microcomputer
Introduction: Several precise delay programs for 51 single-chip microcomputers: In the calculation of precise delay, the most easily overlooked part is the delay outside the calculation loop. In situations where time requirements are not high, this part will not affect the program. 1. 500ms delay subroutine (crystal
[Microcontroller]
Design of Music Editing Generator Based on Single Chip Microcomputer AT89S52
1 Introduction The music editing generator based on RTX51 uses AT89S52 single-chip microcomputer as the control core. The operator can input any music in the agreed format through the 4×4 matrix keyboard. After pressing the "play" key, the system starts to play the edited music, and the pitch and beat can be ac
[Microcontroller]
Design of Music Editing Generator Based on Single Chip Microcomputer AT89S52
Design of Dual Fuzzy Temperature Controller Based on AT89S52 Single Chip Microcomputer as Control Core
    In modern industrial control, temperature control is very important and increasingly complex. Due to the characteristics of temperature control such as nonlinearity, large lag, time-varying, and unidirectional temperature rise, it is difficult to establish an accurate mathematical model in practical applications,
[Microcontroller]
Design of Dual Fuzzy Temperature Controller Based on AT89S52 Single Chip Microcomputer as Control Core
Single chip microcomputer realizes remote control of smart home
1 Introduction With the development of science and technology and the improvement of people's living standards, people have higher and higher requirements for convenient and fast living environment, and smart home system has emerged. Smart home is the product of the combination of modern electronic techno
[Microcontroller]
Single chip microcomputer realizes remote control of smart home
The use of 51 MCU RAM
Today I am still working overtime alone, so I will sort out some small questions that I have been confused about before. Take a 51-core STC89C52 microcontroller as an example. STC89C52 has 8K bytes of Flash, 512 bytes of RAM, watchdog timer, etc. Other resources are not within the scope of today's discussion, so I will
[Microcontroller]
Microcontrollers that combine Hi-Fi, intelligence and USB multi-channel features – ushering in a new era of digital audio
With the continuous integration of many technological breakthroughs and new streaming services, and the growing prosperity of the smart home and smart speaker markets, consumers' demand for audio is no longer limited to sound quality itself, but more about pursuing high-quality life experience and convenient smart i
[Analog Electronics]
Microcontrollers that combine Hi-Fi, intelligence and USB multi-channel features – ushering in a new era of digital audio
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号