In many traditional industries, high-precision temperature data acquisition systems are indispensable. In recent years, with the continuous decline in the price of high-precision ADCs and the continuous improvement of their functions, it has become possible to develop inexpensive multi-channel, fast, and high-precision temperature acquisition systems. The MSC1210 microprocessor with a 24-bit ADC launched by Texas Instruments (TI) is particularly suitable for measuring weak signals output by high-precision temperature and pressure sensors. This paper uses MSC1210 as the core of measurement, signal processing, and communication, and designs a high-precision temperature acquisition system module. The system's measurement channels are easy to expand, the measurement accuracy is high, and high-precision data can be measured quickly.
System overall design
The hardware part of this system mainly consists of front-end data acquisition and processing circuits and back-end data processing and LCD circuits. The two parts communicate through the RS-232 serial interface. The overall scheme of the system is shown in Figure 1.
Figure 1 System overall structure
Software and hardware design of data acquisition part
Hardware circuit design
The core device of the data acquisition part is MSC1210Y5. This is mainly because the microprocessor has a 24-bit ADC, and its effective accuracy is higher than 22 bits. It contains a complete forward channel (including input buffer, analog switch circuit, programmable gain amplifier and ADC and digital filter part) and a backward channel - DAC, which are all necessary parts to complete the measurement and control system. In addition, the processor sets the internal channel function by changing the command register. The instructions can select the input buffer, set the amplification gain, control the channel switch switching, perform offset correction, etc., which is very convenient to use. The circuit structure schematic diagram of the data acquisition part is shown in Figure 2.
The two core chips MSC1210Y5 and MAX3223 in this system have very low power consumption. Therefore, in the design, the power supply (3.3V) on the board is provided by the back-end system through the RS-232 interface. In addition to the wiring of the RS-232 interface and the signal lines (8 AIN lines, REF and common ground) connected to the J1 and J2 sockets, the hardware part of this system does not need other connections, which is very convenient to use. In addition, a part of the interface lines are reserved in the circuit for future expansion of system functions, including the second serial port and four spare interface lines that can be configured as SPI interface, interrupt input and I/O port.
Figure 2 Data acquisition circuit structure schematic diagram
Software Design
In the application of high-precision temperature measurement module based on this circuit, MSC1210Y5 completes the functions of weak signal multi-channel switching, signal buffering, programming amplification, 24-bit ADC, digital filtering, data processing, signal calibration and serial communication. MSC1210Y5 contains 2 serial ports. One of the serial ports is selected in this design to communicate with the back-end human-computer interaction system, which is responsible for receiving the control commands and control parameters sent by the back-end and sending the data collected and processed by the front-end. The main tasks of the data acquisition circuit program are: controlling the measurement process of the internal ADC and reading the converted data; communicating with the back-end (S3C44B0X system), reading the commands and related control parameters of the host computer, and transmitting the converted data to the host computer. The program control flow of the data acquisition circuit is shown in Figure 3.
When the serial port starts to receive commands and data from the host computer, the control word of the 2-byte serial code (temporarily stored in R6, R7) of the back-end system is read in sequence and transmitted to the internal registers ADCON1 and ADCON0 of MSC1210Y5, thereby realizing the writing of ADC control commands. Subsequently, the corresponding commands and parameter values are written into the internal registers of ADCON3, ADCON2, ADMUX and PDCON, thereby completing the setting and startup of the ADC in MSC1210Y5. When sending data to the back-end system, since the ADC is 24-bit precision, the conversion data must be divided into 3 bytes for transmission, that is, the ADC conversion results of registers 1, 2, and 3 are sent in sequence through SBUF. At the same time, this process also includes the sending of synchronization characters, CRC check and other processes.
Figure 3 Program control flow of data acquisition circuit
Overview of Embedded GUI Application System
The hardware part of the system backend is mainly composed of three major blocks: a system board with S3C44B0X as the core, an auxiliary board integrating JTAG debugging circuit, system power supply, LCD interface circuit, and LCD screen.
The back-end software also consists of three parts: system boot loader, embedded real-time multitasking operating system mC/OS-II, and applications based on mC/OS-II. According to the needs of system applications, the applications based on mC/OS-II mainly include serial port communication programs and graphical user interface programs based on mC/GUI.
The serial port in the system is used by the S3C44B0X controller to send control commands and control parameters to the front-end data acquisition part, and receive the collected data sent by the front end in real time, and send it to the controller for processing and LCD display. When the operating system mC/OS-II is started, the serial port is automatically initialized. Since the application is a multi-task system, in order to monitor the serial port information in real time, a serial port scanning task is opened in the system during design, so as to ensure that the information is not lost.
Since mC/GUI provides source code, when developing an application, users can first include the core files, LCD driver files and required font files in their own project, and then develop according to the actual needs of the hardware such as memory devices, input devices, space and window management. The development steps are as follows.
(1) Customize your own mC/GUI development environment according to actual needs. This includes filtering the mC/GUI directory and the files in the directory;
(2) Specify the address of the hardware device and write the interface driver code. Here you need to modify the LCDConf.h file;
(3) Compile, link, and debug the subroutine;
(4) Modify the subroutine and test it to add the required functions;
(5) If you develop a multi-tasking application, you need to modify the GUI_MAXTASK and GUI_OS macros to realize the integration of mC/GUI and the operating system;
(6) Write your own application.
Since mC/GUI does not support the ARM7 processor S3C44B0X, to port mC/GUI to the system platform, you need to complete various drivers of mC/GUI on the system hardware platform yourself, including the correct initialization of the built-in LCD controller in S3C44B0X, and the writing of LCD driver functions such as drawing dots, drawing lines, and filling.
LCD controller initialization: The correct initialization on the S3C44B0X LCD controller includes the correct configuration of various control registers and the correct setting and mapping of the video memory. The mapping of the video memory is to set the source address of the S3C44B0X dedicated LCD DMA to the video memory start address value, which is configured in rLCDSADDR1. In addition, the LCD controller also needs to program other programmable registers in REGBANK to control the corresponding register values and determine the vertical/horizontal pixels, data width of the data interface, interface time and refresh rate, etc.
LCD driver function programming: In the LCD driver function, the lowest level driver functions are the point drawing function and the point fetching function. Displaying characters and graphics in mC/GUI is related to these two functions, which communicate directly with the video memory. In order to display characters and bitmaps, you must also refer to LCDMemC.c of uC/GUI, write DrawBitLine1BPP, DrawBitLine2BPP and DrawBitLine4BPP functions, and configure the constants in GUIConf.h and LCDConf.h. After completing the above driver functions, you can use the Demo program of mC/GUI to test the transplanted mC/GUI.
Conclusion
The high-precision data acquisition system developed using TI's microcontroller MSC1210Y5 has high acquisition accuracy and strong anti-interference ability. It has high application and promotion value.
Previous article:Research and development of embedded systems based on ARM controller LPC2214
Next article:Design of intelligent traffic signal light system based on ARM
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- DGUS T5UID1 implements modbus protocol
- 【Goodbye 2021, Hello 2022】+ My summary of 2021
- Super detailed teaching you to use HFSS to design and simulate inverted F antenna 3
- Keil's optimization is really a rip-off
- [Zero-knowledge ESP8266 tutorial] Quick Start 2- Light up the external LED
- [Embedded Linux] RK3568 Android 11 screen point process
- Xiaoyi H8 camera, V831 vest QG2101
- Negative feedback bandwidth broadening
- Cyclone pin constraints
- 【Smart Network Desk Lamp】5. ESP32-S2 uses sntp for network time synchronization