Abstract: This paper presents a scheme for device status monitoring using an ARM microprocessor, and elaborates on the design and implementation methods. A graphical control interface was developed using the Qt/Embedded 2.3.7 graphical interface development environment, and real-time data transmission was achieved via a network.
Keywords: ARM, condition monitoring, graphical interface, data transmission Classification number: TP216 Document code: B
The Design of embedded monitoring system Based on ARM
LIU Sheng-yu ZHANG Zhi-xin
(The Research Institute of Vibration Engineering Dalian University of Technology Dalian Liaoning 116024)
Abstract: A project of state monitoring based on the ARM microprocessor is presented. The design of the project and the realization of the project is detailed. Has compiled the graph control interface using GUI environment Qt/Embedded2.3.7 Carries on the real time data transmission through internet.
Key words: ARM, state monitoring, GUI, data transmission
ARM has advantages such as small size, rich interfaces, high integration and strong scalability. In addition, with the success of Linux in the server field and desktop system, Linux has been widely used in embedded systems due to its good portability, excellent network function, complete support for various file systems, small software code, high automation, fast response speed, and particular suitability for systems that require real-time and multi-tasking[1]. This makes ARM-based embedded monitoring systems have advantages such as low cost, low power consumption, good real-time performance and high intelligence, and have a broad application prospect in the field of industrial monitoring and control[2]. This paper designs an ARM-based embedded monitoring system.
1 System Overall Design
An embedded monitoring system aims to control hardware devices to acquire and analyze signals. This process involves obtaining analog signals representing the device's operating status and converting these analog signals into digital outputs. Based on this, an ARM-based embedded monitoring system was designed. The ARM microprocessor selected is the S3C2410A chip based on the ARM920T core.
Figure 1 System structure block diagram
The entire system monitoring scheme is shown in Figure 1. The entire data acquisition process is controlled by an ARM microprocessor. The ARM monitoring system mainly consists of the following three parts:
(1) Signal acquisition: Sensors acquire field signals that reflect the operating status of the equipment. The acquired analog signals are picked up by sensors, then filtered, amplified and conditioned. The analog signals are then converted into computer-recognizable digital quantities by an A/D (analog-to-digital) converter. The gain of the amplifier and the cutoff frequency of the filter are controlled by an ARM microprocessor.
(2) Human-machine interface: The graphical interface is used to control data acquisition and perform data analysis on the interface. The data processing results are dynamically displayed on the screen in a good and intuitive interface, which makes it easier for on-site staff to judge the fault.
(3) Data transmission: Data transmission is the process of uploading data to a host computer for further analysis and processing.
2 System Hardware Structure
The vibration signal from the vibration sensor needs to be conditioned before entering the back-end processing system to meet the requirements of the back-end signal processing. To simplify the design and save design time, the front-end signal conditioning module uses a pre-designed module, including a constant current source, sensor detection, signal amplification, and low-pass filtering. The amplification factor of the programmable amplifier is set through the S3C2410A. Figure 2 shows the system hardware block diagram.
Figure 2 System Hardware Block Diagram
2.1 Design of Programmable Anti-Aliasing Low-Pass Filter
The analog signals acquired by sensors often contain other signals such as noise. Therefore, filtering the signal before A/D conversion is essential. Selecting a suitable filter can also help prevent aliasing. This system design uses a MAX263 low-pass filter. The MAX263 is an active switched-capacitor filter whose center frequency, Q value, and operating mode can be set via pin programming. Its hardware connection circuit is shown in Figure 3.
Figure 3 Low-pass filter circuit
Select filter operating mode 1, set M0 and M1 to low level, and set Q value to 1. Looking up the table, NQ=64, so the pin values for Q6~Q0 are 100000. The MAX263 pins are directly connected to the S3C2410 chip to implement a programmable filter. F0~F4 are connected to GPB5~GPB9 respectively. The cutoff frequency of the MAX263 can be set by controlling the corresponding pins on the ARM.
2.2 A/D Conversion Circuit
An A/D converter converts an analog signal into a digital signal. The status signal of a wind turbine is a continuous value. While sensors can detect a continuous voltage value, analog signal data cannot be directly processed by ARM processors and computers. An A/D converter is a device that converts the analog voltage signal detected by the sensor into a digital signal that the system can recognize. Based on the system's conditions and accuracy requirements, a 12-bit A/D converter is sufficient for this system. After A/D conversion, the continuous analog signal is transformed into discrete, discontinuous values for easier data analysis. The A/D conversion chip used is the TI TLC2543. The TLC2543 is a 12-bit switched-capacitor successive approximation analog-to-digital converter, and its circuit connection is shown in Figure 4.
Figure 4 Connection diagram of TLC2543 and S3C2410
During data acquisition, the channel number to be acquired is first sent to the AD converter. The AD converter reads the data of the corresponding channel and transmits the data to the S3C2410A to achieve data acquisition. The process is shown in Figure 5.
Figure 5. A/D data acquisition flowchart
The core of the ARM-based application software in an embedded monitoring system is the human-computer interaction graphical user interface (HCI), which serves as the window for interaction between the user and the system.
This paper applies Qt/Embedded to the development of the human-machine interface of an embedded monitoring system based on ARM+Linux platform. Building a Qt/Embedded cross-compilation environment requires building three QT development environments [3]. One is QT/X11 environment; one is QT/Embedded(x86) environment; and the last is QT/Embedded(ARM) cross-compilation environment. Programs that have been debugged in the QT/Embedded(x86) environment need to be recompiled in this environment before they can be ported to the target machine for operation.
QtDesigner is an integrated development tool under Qt/Embedded. It supports the signal and slot mechanism, enabling effective communication between components, omitting many repetitive tasks, and greatly reducing the program development cycle [4]. In the command line, the uic command is used to generate the .h header file and .cpp source file based on the interface file (.ui file) saved by the designer.
uic -o mainfile.h mainfile.ui
uic –o mainfile.cpp –impl mainfile.h mainfile.ui
Modify the header and source files according to actual needs to implement specific functions. Various initial values and configurations are initialized in the constructors of the corresponding classes, such as implementing the calling relationships between interface classes. Figure 6 below shows the main interface of a wind turbine monitoring system designed using QtDesigner.
Figure 6. Main interface of the monitoring system
4 Data Transmission
The real-time data transmission between the ARM and the host computer adopts TCP/IP-based socket network transmission [5]. The software of the communication system designed in this paper adopts a client/server model in terms of structure, which has the characteristics of simple programming, easy control, and convenient and flexible use.
The server-side and client-side program design flow is shown in Figure 7.
Figure 7 Flowchart of Socket Network Data Transmission
1. Open the Socket descriptor and establish a binding.
sockfd=socket(AF_INET,SOCK_STREAM, 0); //Create Socket
bind(sockfd, (struct sockaddr *)&my_addr,sizeof(struct sockaddr); // Bind to the port
2. Establish connection
connect(sockfd,(struct sockaddr *)&remote_addr,sizeof(struct sockaddr);
//Initiating a connection in the server program: Once a socket is bound to a port, it needs to listen on that port.
listen(sockfd, 8); // Listen for connections. When a client requests a connection to the port the server is listening on, the connection request waits for the server to accept it. The server program then calls the accept() function to establish a connection for the request.
3. Data transmission and reception
send(sockfd, buff, 1024, 0); // Send data to the server
recv(client_fd, buff, 1024, 0); // Receive data sent by the server
4. Close the Socket
Conclusion
This paper introduces an ARM-based equipment monitoring system suitable for vibration signal acquisition and analysis. The S3C2410 is used as the main control chip, and a low-pass filter circuit and an A/D circuit are designed. A human-machine interface is adopted, and the acquired signals are transmitted to the computer in real time using Socket network programming. The transmitted data is not easily lost or distorted, and it plays a good role in monitoring the equipment status.
References:
[1] Zhao Yuzhang, Guo Wenqiang, Han Liying. Development of a small embedded monitoring system [J]. Computer Engineering and Applications, 2007, 43(4): 109-112
[2] Li Yun, He Fuqiang. Equipment status monitoring scheme based on ARM microprocessor [J]. Mechanical and Electronic Engineering, 2006(3):51-53
[3] Ni Jili, ed. Window Design for Qt and Linux Operating Systems [M]. Beijing: Electronic Industry Press. 2006: 212-214
[4] Sun Tianze, Yuan Wenju (eds.). Embedded Design and Linux Driver Development Guide—Based on ARM9 Processor [M]. Second Edition. Beijing: Electronic Industry Press. 2005: 368-373.
[5] Zhang Simin, ed. Embedded System Design and Application [M]. Beijing: Tsinghua University Press. 2008: 128-133
About the author:
Liu Shengyu (1983-), male, Master's student, research interests include embedded systems and fault diagnosis. Email: [email protected]
Zhang Zhixin (1967-) Male, Lecturer, Master's Supervisor. His main research areas are embedded system design, fault diagnosis, and signal processing.
Author's contact information:
Liu Shengyu Email: [email protected]
Phone number 15940904974
Institute of Vibration Engineering, School of Mechanical Engineering, Dalian University of Technology