Development of a Low-Cost Vibration Measurement System for Industrial Applications

: Vibration-Based Condition Monitoring (VBCM) provides essential data to perform Condition-Based Maintenance for efficient, optimal, reliable, and safe industrial machinery operation. However, equipment required to perform VBCM is often relatively expensive. In this paper, a low-cost vibration measurement system based on a microcontroller platform is presented. The FRDM K64F development board was selected as the most suitable for fulfilling the system requirements. The industrial environment is highly contaminated by noise (electromagnetic, combustion, airborne, sound borne, and mechanical noise). Developing a proper antialiasing filter to reduce industrial noise is a real challenge. In order to validate the developed system, evaluations of frequency response and phase noise were carried out. Additionally, vibration measurements were recorded in the industry under different running conditions and machine configurations. Data were collected simultaneously using a standard reference system and the low-cost vibration measurement system. Results were processed using Fast Fourier Transform and Welch’s method. Finally, a low-cost vibration measurement system was successfully created. The validation process demonstrates the robustness, reliability, and accuracy of this research approach. Results confirm a correlation between signal frequency spectrum obtained using both measurement systems. We also introduce new guidelines for practical data storage, communications, and validation process for vibration measurements.


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 lowcost vibration measurement system based on a microcontroller development board is presented. 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 lowpower 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 threelayer 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 multichannel 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.

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, US). 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, US) 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 commonmode rejection ratio (CMRR). 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.

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, US) 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.

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 = 10610 . For the instrumentation amplifier, an AD8221 (Analog Devices, Norwood, MA, US) satisfies the requirements due to its high CMRR (80 dB minimum up to 10 KHz) operated with a linear gain in the pass-band.

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.   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.

Software Development
The visualization and processing software was implemented in Python (Python Software Foundation, Wilmington, DE, US). 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.

Measurement Set-Up and Analysis Procedure
An overview of the experimental set-up, analysis procedure and component details are described in this section. Figure 4 shows the measurement set-up with the standard and the developed vibration measurement systems. The tests were conducted using two accelerometers that were mounted onto the industrial machines. All the vibration signals were simultaneously digitized using the NI-DAQ 9775 module and the FRDM K64F development board, respectively. The measurements were recorded at different speeds and the sampling frequency for all the experiments was 19,349 Hz. To reduce variabilities, each machine was measured five times per 10 seconds. Table  3 shows component details for the standard and developed measurement systems.   Figure 5 shows the industrial machines that were randomly selected for testing our developed measurement system: honing machine (Model: SP30, up to 5000 rpm), cylinder rectifier (Model: Cormag, range between 39 and 165 mm), surface rectifier (Model: KR14007, 5 HP for head rotation and 1 HP for downloading and uploading), and induction motor (Model: Weg, 2 HP, 1400 rpm).

Results and Analysis
This section contains results obtained from the standard and the developed measurement systems. A comparison analysis was performed based on frequency response and phase noise in both systems. Vibration measurements were also recorded in an industrial environment for relative vibration signature comparison.

Comparison of Specifications between the Developed and Standard System
Two main standard specifications were used to compare both systems: frequency response and phase noise measurements. Regarding the frequency response of the developed system, an estimation was obtained from the frequency response of its analog part by removing accelerometer and signal conditioner. First, a circuit simulation in Proteus software (Labcenter Electronics, Grassington, UK) is performed, as shown in Figure 6. The simulated frequency response can be seen in Figure 7.  To obtain an accurate and relevant frequency response of the real developed system, an oscilloscope and a signal generator were used. The signal generator was configured to generate a sweep signal from 10 Hz to 100 kHz. The obtained circuit frequency response is shown in Figure 8. The true maximum gain was 27.06 dB but it was normalized to 0 dB to perform comparisons with the standard device frequency response values, as shown in Table 4. The commercial device can handle frequencies well above 100 KHz. However, the system developed exhibited a nearly constant gain in frequency up to 10 KHz, which is the band of interest.  Regarding phase noise, a USB-based spectrum analyzer (Signal Hound, Battle Ground, WA, US) was used to gather this information. This device was connected to the source clock of the ADC, which was the bus clock in our case. Phase noise plot for the developed system is shown in Figure 9 and the phase noise values of the standard system can be seen in Table 5, respectively. Phase noise in the commercial device is considerably lower.
The reasons for having a higher phase noise may be related to crystal quality and temperature. A low-cost development board is not expected to contain the highest quality oscillators. Moreover, oscillators are completely exposed to the environment and, as a consequence, to changes in temperature with an effect on phase noise. The undesired peak close to 10 KHz is most probably related to limited clock management techniques on the development board.

Vibration Measurements Performed in the Industry
In order to validate our measurement system, we compared the vibration signatures obtained from the measurements performed by our system and the reference system. Measurements were recorded simultaneously using both systems. The results are illustrated in Figures 10 to 13. Figure 10 shows the vibration signatures of an induction motor. Close similarities can be observed; the vibration signature corresponding to the reference system (red) and that corresponding to our measurement system (blue) follow each other well at the fundamental rotation frequency 25 Hz, and harmonics around 50, 75, and 100 Hz.  Figure 11 corresponds to measurements performed on a honing-cylinder machine. Recorded data were analyzed using the fast Fourier transform (FFT) and Welch's method. The figure shows all important peaks are similar, meaning that the developed vibration measurement system was working adequately. Welch's method achieves random noise reduction, as evident in the lower part of Figure 11.     The results obtained show the potential of the low-cost vibration measurement system, demonstrating high reliability and accuracy for machine diagnosis.
Finally, the cost of the developed system is approximately 10% (including the development board, signal conditioning, and the power supply) of that used as reference (DAQ NI 9775).

Discussion
Vibration structures are an inevitable result of any rotating machine. Vibration measurements are a suitable tool for applying Condition-Based Maintenance (CBM) [1,4,5,39]. The main idea of CBM is to collect data continuously in order to use the data to determine when a certain type of maintenance is required. However, equipment to collect data is often expensive. Therefore, we developed a low-cost vibration measurement system for diagnosis purposes. The major challenge was to have a robust, reliable, and accurate measurement system for industrial applications.
Most of the previous studies reported results in laboratory conditions; however, the industrial environment is typically highly contaminated by noise (electromagnetic, sound-borne, and mechanical noise). Developing a proper antialiasing filter to reduce noise properly is challenging, as detailed in Section 2.3.
In future research, the objective will be to implement a real-time monitoring system for machine diagnosis with a compact measurement kit, whereby machine diagnosis can be handled by artificial intelligence (AI) techniques. AI has outperformed conventional approaches for fault detection and machine diagnosis [40][41][42].

Conclusions
The main purpose of this paper was accomplished: a low-cost vibration measurement system for industrial applications was developed and implemented. Additionally, we presented new effective guidance to employ SD cards for massive storage and implement TCP/IP capabilities.
Regarding the validation of the system, a comprehensive set of tests were performed using the standard (reference) system and our developed system. First, we compared the frequency response and the phase noise plots for both systems. Then, we compared the vibration signatures obtained from measurements performed by both systems, in different machines. Based on the obtained results, the developed vibration measurement system has shown robustness, reliability, and accuracy.

Funding:
The authors want to thank the financial support received from UPB for the execution of this research project.