1. Introduction
Recent developments in mechanical equipment have enhanced the functionality of rotating machines. Nowadays, rotating machines are essential in modern industrial applications. Therefore, implementing a proper maintenance program is critical in industry applications.
Condition-based maintenance (CBM) is an efficient program because it attempts to avoid unnecessary tasks by taking actions only when there is evidence of unusual machine performance. According to the literature, proper machine maintenance can save 30% of the total maintenance costs. In CBM, decisions are based on data collected through condition monitoring [
1,
2,
3,
4,
5]. One common type of condition monitoring is vibration-based condition monitoring (VBCM), whereby vibration data are collected. Unfortunately, the equipment needed to perform data collection can be expensive and unaffordable for small companies, especially in developing countries. Therefore, in this paper, a low-cost vibration measurement system based on a microcontroller development board is presented.
We reviewed recent research related to the development and design of data acquisition (DAQ) systems for vibration analysis. The literature review focused on Elsevier, Scopus, SpringerLink, and IEEE journals.
Bilski et al. [
6] developed a low-cost real-time virtual spectrum analyzer. The main impact is the approach in creating low-cost equipment with the functionality of more complex devices. Swiszcz et al. [
7] presented a DAQ platform for the condition monitoring of a wind turbine. The maximum sampling frequency used per channel was 20 KHz. The data are first stored in a MySQL database and then in an Ethernet-based hard drive. Zhang et al. [
8] developed a low-cost microcontroller-based vibration DAQ system for tool condition monitoring. The sampling frequency used to perform their tests was 300 Hz. The frequency range could have limitations for machine diagnosis. The system employs a USB interface to communicate with a laptop. Katalin [
9] described a microcontroller-based system for vibration analysis. The system employs an 8-bit microcontroller implementing serial communication. Florin et al. [
10] presented a DAQ system that reaches 400 KSPS. This system uses an independent analog-digital converter (ADC) module and an independent 16 Mb non-volatile static random access memory (SRAM). The system communicates with a computer using RS232 and RS485. They also implement a MySQL database for data storage. Jamil et al. [
11] proposed a vibration DAQ and visualization system using a microelectromechanical system (MEMS) accelerometer and a Peripheral Interface Controller (PIC) microcontroller (Microchip, Chandler, AZ, USA). The communication between microcontroller and laptop uses RS232. Experimental tests were performed on a simple plastic stand and an induction motor. The tests confirmed the stability and reliability of the system for a frequency range up to 5 kHz. Adeyeri et al. [
12] presented their development of a system using vibration and temperature maintenance models integrating concepts for machine monitoring. Their system is based on an 8-bit microcontroller and records vibration and temperature measurements.
Regarding systems implemented with 32-bit microcontrollers, Luo et al. [
13] proposed a real-time system for vibration measurements using a LPC2129 (NXP Semiconductor, Eindhoven, Netherlands) microcontroller based on a 32-bit ARM7TDMI-S CPU. The microcontroller communicates with a PC running RTLinux via a controller area network (CAN) bus. They perform a simple test on a moving car. Merendino et al. [
14] discussed an embedded system that performs vibration analysis for machine diagnosis. A 32-bit reduced instruction set computer (RISC) ARM9 STR912F44W microcontroller (STMicroelectronics, Geneva, Switzerland) for DAQ and signal processing are used. Additionally, Discrete Wavelet Transform (DWT) was applied at different levels to vibration signals. The embedded system can be connected to a PC via RS232, CAN, or Ethernet. The system was validated on a mechanical test bench. Zhang et al. [
15] introduced a DAQ system based on a 32-bit STM32F103VET6 microcontroller (STMicroelectronics) for rotating machinery monitoring. A three axis accelerometer to measure vibration signals is used. In addition, they performed simple tests at a sampling frequency of 5 kHz. Huang et al. [
16] presented a vibration signal acquisition and analysis system. This system implements a STM32 microcontroller (STMicroelectronics), independent ADC, and Wi-Fi modules. The last module enables wireless communication with a laptop and fault diagnosis tests were performed. Lu et al. [
17] described a wireless DAQ system to evaluate their method for motor bearing condition monitoring and fault diagnosis using under-sampled vibration signals. The system consists of a STM32F407 microcontroller (STMicroelectronics), a 16-bit ADC Max1300 (Maxim Integrated, San Jose, CA, USA), a CA-YD-1182 accelerometer (Global Sensor Technology, Wuhan, China), a programmable analog filter Max261 (Maxim Integrated), and a wireless module. The method was evaluated on a brushless direct current motor.
In the case of single-board computers running operating systems, Ambrož [
18] and Guo et al. [
19] presented DAQ systems for vibration using boards running Embedded Linux. One of the main advantages of these boards is that they integrate Secure Digital High Capacity (SDHC), Ethernet, and Wi-Fi interfaces. These interfaces allow massive storage (in the order of tens or hundreds of GB), and wired and wireless connectivity. Another main advantage of these boards is the implementation and how they facilitate the usage of a full TCP/IP stack to send data over the Internet. This opens the possibility of transforming the developed DAQ systems into Internet of Things (IoT) solutions. Notably, these boards have significant processing power. One drawback is that they do not implement an on-board ADC; therefore, additional modules are required to use these boards as part of the DAQ systems. Finally, both systems have limited memory for sample storage while the data acquisition loop is running. It is difficult to exploit the massive storage capabilities of a Secure Digital (SD) card due to the delays involved in the usage of a file system to read/write data.
About distributed DAQ systems, Nguyen et al. [
20] proposed a cost-effective measurement data acquisition system for long-term structural health monitoring of buildings, using standard DAQ units and LabVIEW (National Instruments, Austin, TX, USA). The system shows how the Ethernet and TCP/IP capabilities of DAQ units are useful in a distributed setting. Hester et al. [
21] presented a wireless sensor network to perform vibration-based structural health monitoring on historic monuments. They designed their own custom sensor board using Eagle (Autodesk, San Rafael, CA, USA). The sensor includes a low noise 1521L accelerometer (Silicon Designs, Kirkland, WA, USA), a programmable gain ADS1120 16-Bit ADC (Texas Instruments, Dallas, TX, USA), a solar panel for solar harvesting, a MSP430 launchpad (Texas Instruments) for processing, and a CC2500 2.4GHz radio transceiver (Texas Instruments) for wireless communication. Several sensors communicate with a base station built on a BeagleBone Black board (Texas Instruments). Their low-cost and low-power system was demonstrated to be robust and accurate. Heo et al. [
22] proposed a unified wireless system to control the vibration of bridges. The system consists of four parts: the wireless measurement (WM) system, the wireless analog output (WAO) system, the main control (MC) system, and the wireless bidirectional communication system (WBC). The WM system employs a cRIO-9014, which is made by National Instruments for data logging applications. This device also allows the use of TCP/IP in the communications between the different parts of the system. Finally, they performed a vibration control experiment on a model bridge. Herrasti et al. [
23] introduced an autonomous sensor node that measures acceleration, strain, and temperature. The node uses a three-layer printed circuit board (PCB) which is powered by a small Lithium Polymer (LiPo) battery. The signal conditioner module consists of an EFM32 low power microcontroller (Silicon Labs, Austin, TX, USA), a 16-bit ADC, and programmable gain amplifier and filter. The radio module allows a synchronized analog-digital conversion. The energy harvesting module collects solar and piezoelectric energy. Finally, they performed vibration tests on a laboratory wind turbine.
Regarding the usage of Field Programmable Gate Arrays (FPGAs), papers related to our research include Devi et al. [
24] and Contreras et al. [
25]. The first one presented a novel hardware architecture for the detection of functional deterioration in turbines. The system was revealed to be cost-effective and appropriate for steam turbine monitoring. The second one proposed a FPGA-based multi-channel vibration analyzer for industrial applications in induction motor failure detection. The main contribution of this second paper is the use of a FPGA for the development of a multichannel vibration analyzer with a data post processing stage. The authors also performed experiments on induction motors to detect failures. Bengherbia et al. [
26] developed a vibration measurement system for detection and machine diagnosis using a FPGA implemented with wireless capabilities. They introduced a wireless sensor node based on an Artix-7 XC7A35T FPGA (Xilinx, San Jose, CA, USA) and a Radio Frequency (RF) transceiver nRF24L01 (Nordic Semiconductor, Trondheim, Norway). The system also implements an Advanced Encryption Standard (AES) block to provide secure data transmission. Finally, the authors validated the node on a rotating machine test bench with an unbalance fault.
The literature review reveals that most of the results were obtained in a laboratory environment and not in field tests. The validation approaches often involved the use of mechanical test rigs and induction motors. However, proper validation of the measurement systems is still required since good results in laboratory conditions do not guarantee good results in a real environment. A fast and easy method to validate a system in real environments involves comparing results with a standard measurement system. Moreover, specifications of the system and the standard system could be compared to gain a general idea of the performance. The literature review also showed that Ethernet and TCP/IP capabilities are very desirable.
Regarding other aspects, in many cases, the sampling frequencies are low due to the technical limitations of employed devices, limitations in data transmission rate, or delays in memory read/write operations. One clear example of this is described by Ambrož [
18]. The issue is that the SD card read/write operations may block the execution of the data acquisition loop for an unacceptable amount of time.
Considering the above observations and the prior literature review, the contributions of our research work are: (1) extensive validation of the developed system by comparison against a standard unit, (2) an implementation of TCP/IP capabilities without an operating system by using light weight implementation of the TCP/IP stack (lwIP), and (3) a reduction in the time required for read/write operations on a microSD card avoiding the use of a file system, hence manipulating data as raw bytes.
The rest of this paper is structured as follows:
Section 2 discusses system architecture and design.
Section 3 describes measurement set-up and analysis procedure.
Section 4 describes results, analysis, and comparison.
Section 5 presents a discussion. Finally, the paper is concluded in
Section 6.
2. System Architecture and Design
This section outlines the proposed system requirements, component list, selection procedure, and design description for most important parts of firmware and software development. The readers interested in this topic are encouraged to use these materials for further development of low-cost measurement systems.
There are four main proposed system requirements: (1) low-cost, (2) performance comparable to an industrial device, (3) data connectivity over a local area network (LAN) and Internet, and (4) high robustness and flexibility to add more features.
Figure 1 depicts the overall schematic diagram of the developed system, which can be divided into two main parts: the analog and digital part. The first one has three main purposes: transduce the vibration signal, perform signal conditioning, and minimize signal aliasing. The second part has four objectives: convert the analog signal to a digital one and encode it, encapsulate data in a TCP segment making it suitable for transmission over a network and Internet, process data, and display data. For clarification, TCP is a highly reliable host-to-host protocol in packet-switched computer networks [
27], part of the Internet Protocol Suite also known as TCP/IP. A TCP segment is its protocol data unit (PDU).
The analog part contains the following components:
- (1)
Power supply of 5 V/12 V/24 V/–12 V 120 W
- (2)
Signal conditioner: PCB Piezotronics ICP sensor signal conditioner model 682A02 (PCB Piezotronics, Depew, NY, USA). It provides excitation voltage and current required by the accelerometer.
- (3)
Accelerometer: A piezoelectric accelerometer was used because it offers high sensitivity, low cost, and small dimensions, making it appropriate for vibration monitoring [
28,
29]. The PCB Piezotronics ICP accelerometer model 353B17 (PCB Piezotronics, Depew, NY, USA) was selected. This accelerometer implements Integrated Circuit Piezoelectric (ICP) technology that includes built-in charge amplifiers [
24]. It has a sensitivity of 10 mV/g (±10%), measurement range of ±500 g peak, and frequency range of 10 KHz with a relative error of ±5%.
- (4)
Active antialiasing filter built on an instrumentation amplifier that offers a high common-mode rejection ratio (CMRR).
- (5)
Diode clipper circuit limits the voltage range of the signal conditioner output to fit the input voltage range of the ADC (0 to 3.3 V) on the Microcontroller Unit (MCU).
- (6)
Direct Current (DC) voltage bias circuit adds a DC voltage bias to the output of the signal conditioner to fit the input voltage range of the MCU integrated ADC. More details are provided in
Figure 2.
The digital part contains the following components:
- (1)
Development board: the core of the system because it runs the data acquisition and data transmission processes.
- (2)
MicroSD card: provides a massive on-board data storage.
- (3)
Ethernet cable: the physical medium that permits a wired communication between the development board and the laptop.
- (4)
Laptop: runs an application to visualize and process data.
2.1. Development Board Selection
The development board is the core of the system, so selecting one that matches the requirements proposed was of critical importance. There are two main alternatives when selecting development boards: microcontroller- and FPGA-based.
Low-cost FPGA-based boards offer less features than microcontroller-based development boards of similar price. It can be mentioned that these boards do not have a microSD card, Ethernet or Wireless interfaces. A microSD card allows storing massive amounts of data in the development board. The microSD cards store data in the order of Gigabytes [
30]. This provides a large buffer that is useful in both real-time and non-real-time applications. Based on the aforementioned, we chose a microcontroller-based board.
Among the microcontroller-based boards, the FRDM K64F development board (NXP) was selected as the most suitable for fulfilling our system requirements. It has an approximate cost of USD
$37. It has an additional feature that supports lwIP for implementation of the TPC/IP protocol stack. It reduces memory usage and code size, making it suitable for embedded systems [
31]. The characteristics of the on-board MCU are shown in
Table 1.
This development board creates the possibility of two major further improvements to the system:
- (1)
Implementing digital signal processing on the MCU using its Floating Point Unit (FPU) and leveraging processor high clock speeds.
- (2)
Implement Bluetooth (Bluetooth Special Interest Group, Kirkland, WA, USA) and RF/Wi-Fi capabilities by adding modules to the specific interfaces on the board [
33]. These features, in conjunction with the lwIP support, provide the possibility of developing a wireless IoT solution.
2.2. Active Antialiasing Filter Design
Relevant frequency spectral signal information, for this application, is contained up to 10 KHz [
34]. Moreover, a low-pass filter with a 3-dB cut-off frequency of 10 KHz is proposed. A typical Sallen-Key second order low-pass filter was initially considered. However, considerable gain and CMRR are required. Therefore, an instrumentation amplifier approach, including second-order low-pass filtering was implemented based on the design of Blomqvist et al. [
35]. In our case, Resistance = 10 KOhm and Capacitances = 560 pF were selected, which correspond to a cutoff frequency
. For the instrumentation amplifier, an AD8221 (Analog Devices, Norwood, MA, USA) satisfies the requirements due to its high CMRR (80 dB minimum up to 10 KHz) operated with a linear gain in the pass-band.
2.3. Firmware Development
Firmware development involved the selection of appropriate tools and writing code. Tools selection was straightforward as the development board manufacturer (NXP) provides a number of readily available modules. There are also useful Application Program Interfaces (APIs) that accelerate development.
Writing code also involves modules configuration and four modules required configuration: system clock, ADC, SHDC, and Ethernet.
System clock configuration is straightforward. It was set to its maximum value of 120 MHz. This selection is also compatible with the desired ADC sampling frequency, which was derived from the main clock [
36].
To configure the ADC, a maximum frequency of 10 KHz was considered based on the analysis presented in
Section 2.2. Then, by applying the Nyquist sampling theorem [
37], a sampling frequency of 20 KHz was required. These parameters and their values are shown in
Table 2. The selection was made to attempt to balance sampling speed and accuracy. Enabling high speed and continuous conversions increase the speed at the expense of reduced accuracy [
36]. Conversely, setting a relatively large hardware averaging count reduces noise and setting long sample cycles increases accuracy, but both decrease conversion speed [
36].
The SDHC module was configured to use Direct Memory Access (DMA). This configuration allows to transfer data from and to the RAM bypassing the processor [
30], effectively reducing the computational load.
The Ethernet module was configured using its default values. This sets a throughput of 100 Mb/s.
Once the modules were configured, the actual program was also implemented. Firmware operation is described by Algorithm 1. The operation has two critical stages: data acquisition and data transmission. In the data acquisition stage, the MCU reads samples from its ADC and writes them to the microSD card. In order to implement the latter operation, the file system module was used first. A file system module offers APIs to create, read, and write files independently of the storage device and the hardware architecture. However, similar to the problem described by Ambrož [
18], we observed that delays in the write operation are unacceptable. They prevent achieving the required sampling frequency. Therefore, we decided to employ a low-level API that handles data as raw bytes. This effectively reduced the time of write operations on the microSD card since an entire abstraction layer (the file system) is omitted. In this way, the process overcomes the problem and it is one of our contributions. Additionally, a ping pong buffer was implemented to avoid losing samples. As
Figure 3 depicts, there are two buffers. The first one stores samples every time the ADC generates an interrupt when a conversion is completed. The second buffer is emptied while its samples are written to the microSD card. Once the first buffer is full and the second one is empty, they exchange roles.
Algorithm 1. Algorithm describing firmware operation. |
1 | initialize modules and variables |
2 | do |
3 | detect microSD card |
4 | while microSD card is not detected |
5 | initialize the microSD card |
6 | collect data |
7 | initialize network configuration |
8 | initialize Ethernet interface |
9 | initialize lwIP functionality |
10 | initialize TCP client |
11 | connect to TCP server |
12 | if connection was successful then |
13 | transmit data to TCP server |
14 | else |
15 | if reset then |
16 | go to 2 |
17 | else |
18 | end |
19 | end |
20 | end |
For the data transmission stage, TCP/IP capabilities were implemented enabling to send data over the Internet. We also considered using a real-time operating system (RTOS) first because it facilitates the development. However, the RTOS requires extra resources and some critical tasks, like high-speed data acquisition, which can be negatively affected. Therefore, lwIP was selected to implement a TCP client.
In the data transmission process, the TCP client running on the MCU tries to connect to a TCP server and initiate a three-way handshake. If the server replies, a connection is established. Then, for each acknowledgement (ACK) of the client, a block of the microSD card is read and sent as a load. This is another one of our contributions; implementing TCP/IP capabilities without using an RTOS. The idea was to use a low-level API (provided by lwIP) based on protocol control blocks.
2.4. Software Development
The visualization and processing software was implemented in Python (Python Software Foundation, Wilmington, DE, USA). Algorithm 2 describes the software operation with the vibration data analysis procedure in the time and frequency domains. The analysis started with the Graphical User Interface (GUI) being initialized prior to the TCP Server. When the “Capture data” button is pressed, the TCP Server starts listening for connections. Once the development board is connected, it starts sending data. When it finishes, the software creates a “.txt” file. If the button “Process” is pressed, the Fast Fourier Transform (FFT) values are calculated from time domain, written to another “.txt” file and plotted.
Algorithm 2. Algorithm describing the operation of the visualization and processing software. |
1 | initialize the GUI |
2 | initialize TCP server |
3 | while “close button” is not pressed do |
4 | if “Clear” button for the time domain plot is pressed then |
5 | clear time domain plot |
6 | End |
7 | if “Clear” button for the frequency domain plot is pressed then |
8 | clear frequency domain plot |
9 | End |
10 | if “Select folder” button for time domain data is pressed then |
11 | Open dialog box to select folder |
12 | Set the folder for time domain data files |
13 | End |
14 | if “Select folder” button for frequency domain data is pressed then |
15 | Open dialog box to select folder |
16 | Set the folder for frequency domain data files |
17 | End |
18 | If “Capture data” button is pressed then |
19 | Do |
20 | TCP server is listening |
21 | while TCP client is not connected |
22 | capture data |
23 | save time domain data file to folder |
24 | plot time domain data |
25 | End |
26 | if “Process” button is pressed then |
27 | process time domain data to get frequency domain data |
28 | save frequency domain data file to folder |
29 | plot frequency domain data |
30 | End |
31 | End |