Optimization of Low-Cost Data Acquisition Equipment Applied to Bearing Condition Monitoring

: The development of low-cost data acquisition equipment is relevant in the increasingly automated industry of today. This study presents the optimization of low-cost data acquisition equipment performance to achieve acquisition speeds of 200 kHz. This was possible by evaluating two essential aspects: considering the influence of the power supplied by the power source and changing the type of data used from “Double” to “uint”. This equipment was validated through the acquisition of known waves and vibration signals from a bearing test bench. The frequency component was satisfactorily identified in each case, for both the known waves and the damaged bearing components. This demonstrated the viability of developing low-cost data acquisition equipment that can be implemented to monitor bearing condition


Introduction
In a world where technology and the pursuit of efficiency are the fundamental drivers, the maintenance of systems and equipment is a cornerstone of safety and reliability [1,2]. From manufacturing to energy and transportation asset management, condition monitoring (CM) has emerged as one of the main strategies of condition-based maintenance. To do this, CM systems gather information that allows recognizing anomalies in operating parameters early enough to establish a cost-effective maintenance plan, thus reducing downtime and fault-related costs [3][4][5].
According to Crespo et al. [6], the implementation of CM not only leads to a better understanding of how industrial systems operate and behave but also provides a basis for their optimized management. From this perspective, CM is established as a key practice to anticipate failures, optimizing the performance and prolonging the lifetime of equipment and systems [7][8][9]. Similarly, McMahon et al. [10] described CM as an essential source of information on the condition of equipment and systems, allowing subsequent decisions to be made efficiently and effectively. Furthermore, the introduction of Industry 4.0 technology concepts has generated even more interest in considering CM as a key strategy for equipment diagnosis [11][12][13]. These technologies (such as cloud, artificial intelligence, robotics, the Internet of Things, etc.) aim at automating and connecting all equipment, where the acquisition and processing of a large amount of data is a key factor. This has allowed expanding the capabilities and possibilities of CM implementation [14].
At the initial stages of implementing a CM system, it is necessary to determine the criticality of the equipment under study and how it affects the production process. This allows estimating the warning time required, the parameters of interest to be monitored, and the data acquisition intervals. This selection requires adapting the sensors and the data acquisition system (DAQ) to the parameter of interest and the component being analyzed [12]. According to Bustos et al. [15], vibration signals are the most commonly used parameter in CM systems for diagnosing the critical components of rotary machinery. Vibration analysis is even considered to constitute 58% of the entire market of CM strategies [16]. Consequently, bearings are considered to be components with a high probability of failure in a machine, where the appearance of unexpected defects can cause great economic losses and, in extreme cases, human losses [17,18].
Despite the undeniable benefits, CM faces significant challenges in its implementation. One of the main drawbacks in the implementation of CM lies in the cost of the initial instrumentation of the equipment. In areas such as bearing diagnostics using vibration signals, it is necessary to have high-performance recording equipment [19]. Among the main characteristics that this type of DAQ must possess are accuracy, number of channels, and high sampling frequency. Although the latter depends on the geometric characteristics of the bearings, Bernal et al. [20] recommended using a sampling frequency of 50 kHz for bearing diagnostics. This has led to studies focused on developing high-performance DAQ systems at low cost, which can guarantee accessibility in the implementation of this type of condition-based maintenance strategy.
Several studies of data acquisition system prototypes have been developed, but most of these fail to meet the requirements for acquiring bearing vibration signals. Seyedmilad et al. [21] presented low-cost equipment (called CHEAP) designed for the accurate measurement of structural vibrations. This equipment was considered to be a high-sampling frequency unit, with a capacity of 85 Hz in each channel. Kumar et al. [22] presented a low-cost data acquisition unit designed to acquire current, vibration, and sound signals at a sampling frequency of 140 Hz. Vidal and Pindado [23] presented a 5-channel Arduinobased data acquisition system with the capacity for a sampling frequency of 500 Hz. In contrast, other studies have developed high-performance recording equipment but lack the data for them to be reproduced. Bosso et al. [24] presented a prototype for a multifunctional system applied to railway vehicles capable of recording vibration and temperature. Saha et al. [25] presented a prototype for a high sampling frequency DAQ system (10 MHz) designed to capture acoustic emission signals.
Finally, the Railway Technology Research Centre (CITEF) of the Polytechnic University of Madrid presented a data acquisition module based on a CPU unit and a data acquisition card [26]. This DAQ was characterized by its use of low-cost components and high performance regarding the number of channels and recording capacity. Nevertheless, when all four channels were used to record data, the unit only reached a maximum sampling frequency of 35 kHz per channel, which limited its implementation for assessing certain types of bearings.
The present article describes improvements to the DAQ developed in [26]. The main goal is to carry out a deep analysis of the unit's behavior in order to guarantee even higher performance and more accurate data acquisition. These optimization tasks consider both hardware and software. For the hardware, the influence of power supply on the performance of the DAQ and the quality of the acquired data was analyzed. On the other hand, in the data acquisition software, the code structure was optimized, changing the type in which the data is written. Similarly, the estimation and selection of the best clock divider in the SPI bus speed configuration was optimized, considering the desired sampling frequency and the RPi system clock speed. The main contributions of this work are summarized as follows.

•
Increasing the maximum sampling frequency of the equipment, reaching 201 kHz when using one recording channel and reaching 50 kHz when using all of its channels (4). This represents an average increase of 60% in its capacity when compared to its previous version; • Improved sampling rate stability, reaching a constant sampling rate up to 20 kHz; • Increased data storage efficiency, guaranteeing an equivalence between the acquisition time and the time needed to write the data.
The rest of the document is organized as follows. Section 2 provides a review of the DAQ structure, features, and limitations. Section 3 details the optimization tasks developed in the DAQ. Section 4 focuses on the experimental setup to acquire bearing state vibration signals using the optimized DAQ. Section 5 presents the validation results and the new performance of the optimized DAQ. Finally, conclusions and future research directions are provided in Section 6.

Equipment Structure
The DAQ system was developed taking into account the essential requirements for analyzing the bearing condition using vibration analysis. One of the main goals is that of acquiring data from different signals at once, which requires the equipment to have several recording channels. This DAQ must be at least as accurate as commercial equipment. Another important feature to be considered is the sampling frequency required by the equipment to acquire bearing vibration signals, which is recommended to be 50 kHz in each channel. Finally, it should be a complete DAQ module formed by a CPU unit and a converter card that allows easy transport for tests in the field and that is sufficiently compact with remote connectivity so that it can be placed in small locations with difficult access.

Hardware
The hardware of this equipment consists of a CPU unit and a data converter card. As a CPU unit, the DAQ developed uses a single-board Raspberry Pi 3 B+ (RPi) computer. This is a key component in the structure of the recording equipment, because of its high performance at an affordable cost. The RPi is the core of the system, responsible for managing, processing, and storing the vibration data acquired in its internal memory. Furthermore, depending on the storage requirements, the RPi allows using an external memory or cloud storage solutions for managing large volumes of data. This feature makes it an ideal option for condition-monitoring applications linked to SCADA systems. The RPi has an independent operating system that is compatible with several programming languages. It also has a processor, RAM memory, I/O interfaces, and options for remote connectivity that enable executing the required software remotely.
Data are recorded by a data acquisition and conversion card. This card is designed to capture and sample the vibration signals with great accuracy and at a high sampling frequency. The card has four input channels linked to a multiplexor (MAX4518CPD), which manages the connection of each connected channel and stores the data until the converter has completed its task. This allows acquiring data simultaneously from different sensors. The analog/digital converter (ADC) used in the acquisition card is ADS8326, with 16-bit resolution and is capable of reaching a sampling frequency of up to 250 kHz (FSample).
Communication between the RPi and the data acquisition card is achieved via the General Purpose Input/Output (GPIO) pins, using an SPI communication protocol (Serial Peripheral Interface). Figure 1 shows the structure of the DAQ with the components that make up the data acquisition and conversion card. The recording equipment uses specifically developed software to control the operation of the different components of the data acquisition and conversion card and manage the storage of such data. It is worth noting that the software is installed in the RPi memory, which makes it possible to control data acquisition via a remote connection. This software controls and manages the identification of the recording channels (either manually or automatically), configures the working frequency for the ADC clock (FClock), establishes the desired sampling frequency, manages the connection of each connected channel, receives the digital vibration signals from the acquisition card, and stores the acquired data in the RPi memory.
According to the ADS8326 data sheet specifications, the FClock is defined using Equation (1). In this work, the maximum sampling frequency of the ADC (250 kHz) is considered, so the FClock is estimated at 6 MHz.
A Double data type was chosen to manage the acquired data owing to the ease with which it can represent decimal values with high precision. Once the acquired data correspond to the desired sampling frequency, the data are dumped into a write string that will be temporarily stored in memory until the data are written into a text file. Finally, when the requested recording time has elapsed or the data acquisition order is stopped, the data will be stored in the text file, which will be closed.

Equipment Features
One of the main features of the DAQ developed is its high sampling frequency, of 110, 65, 45, and 35 kHz, respectively, when using 1, 2, 3, and 4 simultaneous channels. This allows the unit to be used to capture vibration data for rotating machinery, especially for critical components that require high sampling frequencies, such as bearings and gears. This enables performing condition-monitoring tasks on the machinery for the early detection of faults.
Another clear advantage of the proposed recording equipment is its low cost compared to other commercial data acquisition systems. Considering the DAQ as a complete data acquisition module, its cost is EUR 213, whereas the cost of a commercial DAQ with these characteristics, such as WebDAQ 504, is more than seven times higher. This makes it accessible for a wide range of applications and allows it to be implemented in industrial environments that require affordable and effective condition monitoring.
On the other hand, the components that make up the equipment guarantee the accurate capture of vibration signals in the frequency range required for monitoring the condition of rotating machinery. This has been verified through the capture of data from known waves and vibration signals for different bearing conditions. In each of these cases there was great data acquisition performance, in both identifying the known wave frequency and evaluating the frequency and classic fault modes of the bearing components [26,27].
Furthermore, the use of the RPi as a processing and data storage unit offers flexibility and enables customizing the DAQ unit to specific condition-monitoring needs. This feature, along with its remote connectivity, allows developing a DAQ system that is sufficiently compact to be placed in difficult-to-access locations and easily transported for tests in the field (see Figure 2).

Limitations of the Equipment
Although the equipment presents significant advances in data acquisition at high sampling frequencies, it is important to mention the inherent limitations of this equipment. This study analyzes these limitations, focusing on key aspects such as sampling capacity, measurement accuracy, and the time it takes to store the data.
The recording equipment's sampling capacity is an important limitation. Although it achieves a high sampling frequency, when using all four channels it does not achieve the recommended sampling frequency for acquiring bearing vibration signals (50 kHz). This limitation could compromise the capacity of the equipment to detect vibrations in the high-frequency bands associated with bearing condition, which is crucial to effective monitoring.
The accuracy of the vibration measurements is another limitation to be taken into account. Despite the low cost, the recording equipment may present limitations regarding accuracy during data acquisition. This leads to a variable sampling frequency that generates problems when analyzing the data in the frequency domain. This requires a resampling step to guarantee that each discrete sample is acquired at equally spaced time intervals.
Finally, the time required to store the data is another critical aspect for the operation of this equipment. Although the data acquisition time corresponds to that stored in the text file, there is a delay in the writing of these data after the end of the data acquisition process. This means that there is a certain delay for a given acquisition time until the equipment finishes writing all the data in the text file. This drawback is related to the way in which the data are dumped for writing. In this process, the data are queued in a buffer (volatile memory) while waiting to be written into the text file. Figure 3 shows a record over 64 s, where blows were induced so that they are perceived by the sensors at approximately 30, 45, and 60 s. This demonstrates that the data are being acquired correctly. However, the problem lies in the time required to write such data.

Optimizing the Data Acquisition System
When developing a DAQ, the times of data capture and writing are critical factors that directly affect the efficiency and accuracy of any measurements. It is therefore necessary to assess different aspects that affect the DAQ system performance regarding the quality of the acquired data and the time required to acquire and store said data. These tasks are related to the power supply and the efficiency of the programming code. The following sections present each of these tasks, focusing on the most important ones.

Influence of Power Supply Voltage on the Recording Equipment
Power supply is a critical factor in the operation of data acquisition equipment. It is therefore essential to understand the influence of power supply voltage on the operation of each of the components of such equipment. Both the CPU unit, based on an RPi, and the ADC converter of the data acquisition card require a stable and adequate voltage for reliable and accurate operation. Any variation in this voltage can have a significant impact on the performance of these components, affecting the stability of the acquired signal and the capacity to manage and collect the data, thus causing the loss of critical information.
According to the specifications, the RPi requires a power supply that produces 5 V and a current of 2.5 A for maximum performance. The data acquisition card and the ADC require a constant supply of 5 V to achieve their maximum sampling frequency and to maintain a stable resolution. Therefore, the power supply must guarantee the conditions required by the RPi unit despite fluctuations in the current consumption generated by connecting other components such as the converter card or the requirements of actions such as the writing of the data.

Stability of the Acquired Signal
In performance tests of the DAQ, signals from vibration sensors were acquired using 5 V and 2.1 A portable batteries. The following are some drawbacks observed because of a poor power supply.
In the operation of the DAQ using generic portable batteries, there may be moments of time with instability in the acquired vibration signal. Therefore, data of the vibration signal and the voltage supplied by the power supply were captured. Figure 4 presents these acquired signals, where in the representation of the vibration signal ( Figure 4b) the sensitivity and offset of the sensor were not considered. The results indicated that when the power supply voltage varies (Figure 4a), this is likely to directly affect the stability of the acquired signal (Figure 4b). This is generated when the power supply is insufficient, so it is not able to compensate for the oscillating voltage drop of up to 0.16 V generated by the operation of the RPi, the ADC converter, and other components sensitive to voltage changes (such as sensors). Furthermore, it is possible to observe that the instability of the acquired vibration signal is proportional to the variation in the supply voltage. This behavior is not related to the characteristics of the power supply alone, but also to the quality and length of the cable used to supply said power to the equipment. Similar behavior was observed when using generic wall adapters as the power source. Portable power supply units are also affected by the time of use and charge capacity. The prolonged use of power supply units with poor capacity (5 V and 2.1 A) generates great wear, which then leads to poor power supply. This can be seen in Figure 5, which shows the behavior of the acquired vibration signal (considering the sensitivity and offset of the sensor), according to the time of use of a portable power supply. Figure 5 shows that, despite the battery having limited characteristics for the requirements of the recording equipment, this power source was capable of providing a sufficiently constant power supply during the first few hours. However, after a long time of use, the power source showed distortions in the power supply, generating distortions in the signal acquired and generating a voltage drop of 0.1 V.

Selecting the Power Source
To guarantee optimal operation of the DAQ, this study assessed the quality of the voltage supplied by different power supplies. The objective was to identify power sources that provide stable and adequate power and meet the specifications required by the DAQ system. Table 1 shows this analysis. According to the specifications, each battery provides 5 V at currents of 2.1 and 3 amperes. Each of the batteries was used to acquire records over 60 s with a sampling frequency configured at 48,000 Hz. The analysis was performed by analyzing the average sampling frequency (Fs) achieved, the accuracy of the data acquired by means of the standard deviation (Std) of the sampling frequency, and the average storage time achieved. According to the results presented in Table 1, the RS and Havit power supplies showed the lowest performance, both in the average sampling frequency achieved and the greater standard deviation of the sampling frequency. However, they differed in the storage time achieved. This behavior was associated with their specifications, since these are the power supplies with the lowest capacity. On the other hand, the Baseus65w and Charmast power supplies were the two with which the DAQ system achieved its best performance. Although the Charmast power supply showed slightly greater accuracy for data capture (given its lower standard deviation), the Baseus65w power supply achieved an average sampling frequency closer to that requested and a significantly greater time for data capture. Therefore, according to the analysis performed, the Baseus65w power supply was considered as the power source unit. The summary of DAQ performance with the different power supplies is shown in Figure 6.

Power Supply Mode
The RPi has several options for power supply, the Micro USB port being the one recommended by the manufacturer owing to its overcurrent protection circuit. Nevertheless, it can also be powered by feedback through the USB ports or the power supply pin on the GPIO port. In these last two cases it is important to ensure that the power supply used includes overcurrent protection measures. These power supply options for the RPi can be observed in Figure 7 (red circles). Likewise, the converter card can be powered by the 5 V pin of the RPi GPIO port or externally at any point of the power supply line. Considering the requirements of the recording equipment components and the effects these have on performance, this study analyzed different power supply modes in order to provide as stable a power supply as possible. Three power supply modes were evaluated in the DAQ system. The first two power supply modes involve supply in series from the Micro USB port of the RPi or from the data acquisition card. Finally, the third power supply is performed individually or in parallel through the RPi Micro USB port and the data acquisition card. This analysis used the Baseus65w power supply. The signal acquired was generated by a wave generator with a frequency of 5 kHz over 60 s. Figure 8 shows the performance of the DAQ system according to the power supply mode. The results indicated that the RPi power requirements are guaranteed when using a DAQ power supply in series through the Micro USB port, which allows achieving longer data writing times. However, it reduces the current reaching the converter card (5 V pin of the GPIO port), which affects its sampling frequency performance. This is also observed if the power is supplied from the data acquisition card. On the other hand, the independent power supply (Ind) to the RPi and the data acquisition card guarantee the performance demanded from each component, thus reaching a greater sampling frequency, greater data writing time, and a reduction in the standard deviation for data acquisition frequency.

Influence of the Type of Data on Memory and Storage Speed
In a DAQ system, the type of data handled in the programming language takes on an important role in defining the storage methods and how to represent and interpret the information [28]. This tells the computer the class, attributes, and precision of the data being handled while executing the program. The choice of data type thus has a significant impact on the RPi performance regarding memory efficiency and storage speed.
As mentioned in Section 2.1.2, the data capture software used a Double data type. This type of data is characterized by representing decimal values with high precision via a 64-bit floating point. Running software thus requires greater storage capacity, since 8 bytes of data must be reserved in memory for each variable defined with this data type. This implies that more read and write operations are required to manage and store these data, which affects the general performance of the DAQ system. It is important to mention that each acquired sample is dumped into an independent write thread in the data capture management software. This leads to maintaining large amounts of data in queues waiting to be stored, reserving a large part of the memory for this task.
Since the converter used in the data acquisition card has a 16-bit resolution, using Double type data provides no benefits in terms of precision, since a large part of the memory is being reserved for data management, the precision of which is not related to the performance of the ADC converter being used. This has a direct influence on the performance of the RPi, producing delays in the data read and write times.
In contrast, uint data are smaller and occupy less space in memory. This type of data allows representing unsigned integers in a range from 0 to 65,535, which coincides with the representation capacity of the 16-bit ADC converter used in the acquisition card. Using this type of data thus ensures a direct correspondence between the input values captured by the ADC and those stored in the memory of the acquisition system. This change in data type comprises the optimization task with the most influence on DAQ performance. This is possible since it frees up memory, facilitating data management. One of the main advantages lies in the equivalence between the times of acquisition and writing of the data. Thus, to acquire a 60 s recording, 60 s in real time are currently required. This can be observed in Figure 9, which represents the difference in data acquired and stored over 60 s, using each of the data types evaluated. This shows that by using the Double data type (Figure 9a), it is possible to store samples for the first 55 s, whereas by using the uint data type (Figure 9b), it is possible to record all the data for the entire time requested.

SPI Clock Frequency Divider
One of the main attractions of the RPi is its ability to communicate with other devices through the SPI bus used in this study. This communication is established using the BCM2835 library, where it is possible to configure the SPI clock frequency. This SPI clock frequency determines the data transfer rate and the synchronization between the devices on the SPI bus (RPi and data acquisition board). On the other hand, the RPi has a system clock speed that directly affects the maximum frequency that can be achieved on the SPI bus. This makes it necessary to consider the system clock speed when setting the SPI clock frequency, and in turn, the SPI clock frequency will depend on the desired sampling frequency (FSample), see Equation (1).
The BCM2835 library provides functions for RPi communication with other devices, including SPI bus configuration. To set the SPI clock frequency using the BCM2835 library, it is necessary to calculate the appropriate divider based on the system clock rate and the desired sampling frequency. This divider is used to divide the system clock rate to obtain the SPI clock frequency (see Equation (2)). However, the SPI clock frequency on the RPi processor can only be configured based on a string of internal prescalers that are powers of 2 (according to the BCM2835 library documentation), such as 2, 4, 8, 16, 32, 64, 128, etc. Thus, when configuring a clock divisor that is not a power of 2, the SPI driver will automatically round to the nearest low clock divisor that is a valid power of 2.
As described in Section 2.1.2, the SPI clock frequency (FClock) of the ADC was defined at 6 MHz, so the FClock is not always associated with the desired FSample. In this case, the FSample is defined by a data read loop, acquiring only the data corresponding to the time equivalent of the desired sampling frequency. Such a structure made it possible to achieve sampling frequencies of 110, 65, 45, and 35 kHz using 1, 2, 3, and 4 channels, respectively. However, this configuration significantly affects the performance of the DAQ, in both the desired data capture frequency and the stability of the sample acquisition rate per unit time.
According to Yang et al. [29], setting the clock frequency too high may exceed the hardware capabilities and result in unstable communication or data transmission errors. On the other hand, too low a clock frequency may limit system performance and affect the data transfer rate. The latter ratifies the low sampling rate achieved in the DAQ proposed in [26] and the instability of the acquired data at a low sampling rate.
This has made it necessary to use a structure that defines the SPI clock frequency, being consistent with the desired sampling frequency and considering the RPi system clock speed. Equations (1) and (2) are considered to estimate the clock divider to be used in the SPI bus speed configuration. The BCM2835 library specifies that the RPi used in this study has an FSystem clock of 400 MGz. Figure 10 presents the influence of using a correct clock divider on the stability of the acquired data at different sampling frequencies (1, 10, 20, 50, 100, and 200 kHz). The results indicated that by calculating the right clock divider and selecting an appropriate SPI clock frequency, the desired sampling frequency can be achieved, and system performance optimized. This was mainly observed for data acquired at sampling frequencies of 1, 10, and 20 kHz, where the standard deviation of the sampling frequency was zero. For data acquired at a sampling rate higher than 20 kHz, it was observed that a constant sampling rate was not achieved. However, a better performance of the DAQ was observed. The standard deviation of the data acquired at sampling frequencies of 50, 100, and 200 kHz significantly decreased compared to the results presented in [26].

Experimental Data
When validating the new performance of the optimized data acquisition system (DAQ-o), this analysis followed the guidelines laid down in [26]. The DAQ-o was therefore used to acquire vibration signals from the bearing test bench built by CITEF. This section details some of the changes made on the test bench. Further details of the structure of the bearing test bench are presented in [26].

Bearing Test Bench
The bearing test bench (BTB) built at CITEF followed some recommendations provided by bearing manufacturers [30,31]. According to standard EN 12082 [32], the minimum elements that make up the BTB are the rotation mechanism, the power control unit, the load mechanism, the load control unit, and the test mechanism (see Figure 11). A notable feature of the BTB is its capacity to evaluate bearing behavior at different speeds and loads, which are considered factors with an impact on the vibration index [33].

Load Mechanism and Control Unit
In this BTB, the load was applied to the axis by means of a tightening tower placed between the bearing supports. Initially, the tightening tower consisted of two threaded rods placed at each side of the axis and a thrust plate, as seen in Figure 12a. To quantify the load, this BTB used an FX1901 compression cell and an INA125P amplifier, so it was necessary to analyze the relationship between voltage, load, and the tightening torque on the screw. However, the friction generated between the screw and the thrust plate caused problems when quantifying the load. The threaded rods were therefore replaced by two S-type PSD-S1 load cells attached to the test bench structure and placed at each side of the axis, as shown in Figure 12b. The use of these load cells in the tightening tower allowed implementing a load control unit in real time. This unit used amplifiers for the signal of each load cell. This signal was then sent to an Arduino ® microprocessor in which the calibration of each load cell was configured. In addition, this unit had a MicroSD adapter and an LCD screen in order to store and display the load applied, as shown in Figure 13.

Sensors
According to standard ISO 13373-1 [34], the transducer to be used depends on the component to be analyzed, with accelerometers being recommended to quantify vibration rates in bearings, as they may reveal masked faults in high-frequency bands. This data acquisition system thus used a low-cost 805M1 accelerometer mounted via a threaded connection. This accelerometer was mounted using a magnetic coupling to guarantee the perpendicularity of the accelerometer with respect to the contact surface. The accelerometer had a dynamic range of ±20 g, a sensitivity of 100 mV/g, and a flat frequency response of 10 kHz. It also incorporated a stable piezoceramic crystal with an excitation voltage of 3 to 5.5 V and an operating temperature between −40 °C and +100 °C.

Sensor Location and Orientation
In order to obtain the greatest sensitivity to changes in vibration behavior, this study considered the areas in which application of the load generated the maximum dynamic stresses on the bearings [33][34][35][36]. Therefore, the accelerometers for the bearings with supports (Ac_1 and Ac_3) were placed at 6 o'clock (at the bottom) and the accelerometer for the load tower bearings (Ac_2) was placed at 12 o'clock (at the top), see Figure 14. An adhesive mounting was used to ensure maximum rigidity between the accelerometer and its respective positions, to ensure the transducer signal did not undergo major distortions owing to the resonance frequency of the mounting method (ISO 5348:1998, 2000).

Experimental Design
The data acquisition system was used to capture vibration data from a bearing test bench. Three test bearings were used, each associated with faults in rolling elements (REs), outer race (OR), and inner race (IR). Each bearing was assessed at five levels of failure that included the normal state (F0, F1, F2, F3, F4) at an operating regime of 500 rpm and a load of 400 kg, defined as controllable factors. The sampling frequency used for data acquisition was 48 kHz over three channels during a data acquisition time of 58 s. Subsequently, the obtained records were resampled to 40 kHz to ensure a constant sampling rate throughout the record. Table 3 describes the factors and levels considered in this test.

Processing of Vibration Signal Data
When pre-processing the representative samples, the main objective is to extract the greatest amount of information about the condition of the components under study. Gupta and Pradhan [37] suggested that the data processing technique used in the analysis must be chosen in accordance with the component under study.
Therefore, considering the oscillatory behavior of bearings, this study used the envelope analysis technique, which seeks to detect excited resonant areas or amplitude modulation due to periodic impact forces. This is a characteristic pattern of bearings, in which the frequency of repetition is an indicator of the location of the defect and its amplitude is a measurement that characterizes the condition of the component [38]. This process involves a sequence of operations performed on the vibration signal that starts by eliminating the low frequency components associated with other conditions of the rotating equipment, such as imbalance and misalignment [39]. Subsequently, the signal envelope is obtained by means of the Hilbert Transform. Finally, the envelope spectrum is built.
Interference components are removed by filtering the signal. Therefore, the frequency band to be analyzed should be determined, in order to obtain the greatest amount of information on bearing condition [40,41]. This study considered the estimated filtering band of 6.1-9.2 kHz proposed in [26]. Table 4 shows the DAQ performance before and after the optimization tasks. The results indicated that the developed tasks speeded up both the read and write times, thus leading to more agile data management. This significantly affected the maximum sampling frequency of the DAQ system, reaching a 60% increase on average in its data acquisition capacity using different numbers of recording channels. On the other hand, the standard deviation of the sampling frequency also decreased with the use of uint data and an appropriate clock divider. This occurred because the reduction in memory requirements allowed increasing the performance of the RPi and balanced the accuracy of data capture, giving rise to a more stable maximum sampling frequency.

Timing Accuracy of the Data Acquired for Known Waves
Guaranteeing a regular time interval between the capture of each data point leads to the DAQ system having a constant sampling frequency. This is considered a critical factor that affects the quality and reliability of the results and has a significant influence on the accuracy of detection of the frequency components in the spectral analysis. Thus, when processing the data and changing the domain from time to frequency, it is important to have a dataset that has the same number of data points per unit of time and that each data point is acquired at regular intervals. Otherwise, the spectral analysis of a set of data acquired at a non-constant sampling frequency may show sidebands and offsets in the frequency components.
This made it necessary to assess the behavior of the optimized data acquisition system (DAQ-o) regarding recording timing accuracy. For this purpose, a wave created with a wave generator (at a frequency of 5 kHz) was acquired using different sampling frequencies in the DAQ-o to acquire the signal. According to the results obtained by the optimization tasks performed, the DAQ-o reached a constant sampling frequency up to 20 kHz, whereas when configuring the DAQ-o at a higher sampling frequency (200 kHz, for example), the acquisition time for the data was not regularly spaced. These two behaviors related to the effect of accuracy in the capture times of the DAQ-o are presented in Figure 15. As observed in Figure 15b, variations in the capture time of the generated wave data did not significantly affect the time domain for the different sampling frequencies presented. However, the opposite was true when analyzing in the frequency domain. When using a 200 kHz sampling frequency the acquisition time for each data point was not equidistant, which caused the spectral analysis to manifest sidebands alongside the frequency component (see Figure 15c).
Overcoming this drawback required a signal resampling step. Accurate timing of data capture can be guaranteed by using sampling frequencies greater than 20 kHz in the DAQ-o. Figure 16 shows the capture of waves created at different frequencies and using a sampling frequency of 200 kHz in the DAQ-o, which made it necessary to use a signal resampling step. The results demonstrated that the resampling step guaranteed the accurate timing of data capture, which in turn eliminated possible offsets and sidebands in the frequency component.

Acquisition of Vibration Signal Data in a Bearing Test Bench
In this phase of the recording equipment validation, the objective was to be able to acquire vibration signals associated with the condition of the bearing and to process these to replicate the failure modes described in the literature. This allowed us to demonstrate the DAQ-o performance and the feasibility of implementing it in bearing condition monitoring by the acquisition of vibration signals.
Since they are subjected to stress while rotating, bearings develop different kinds of damage due to fatigue of their elements, even under normal conditions of load, oil properties, and correct assembly [42]. According to Ghafari [43], the impulses generated by small defects on the surface of bearing components create transient events manifested by an increase in impulsivity and a change in the stationarity of the vibration signal, which excite the natural frequencies of the bearing structure [43]. Therefore, by evaluating bearing vibration signals it is possible to identify the presence of damaged components by their operating frequency. The following sections evaluate the records of each case of induced faults in the test bearings.

Outer Race Fault Detection
The outer race is the component most likely to wear because of its static location in its housing (in most cases), and the same race segment being subjected to a stationary load [44]. Therefore, it is usually the first fault frequency to be detected. As for the vibration behavior, this will depend on the angular position of the defect. That is, the vibration index will be influenced by the proximity of the defect to the load zone.
Considering the above, if the fault is in the load zone, harmonics developed by excitation pulses will be generated when the rolling elements pass over the fault, which may present sidebands spaced at the frequency of the cage, the shaft, or both [36]. This vibration level will be consistent with the mechanical clearance of the bearing components. Figure 17 shows the envelope spectrum of a record associated with an outer race fault, illustrating the fault frequency (BPFO) and its harmonics, with the presence of sidebands spaced at the shaft rotation frequency (in some cases). However, the presence of sidebands spaced at the cage frequency was not observed.  Figure 18 shows the behavior of envelope spectra as the fault generated in the outer race increased. This allowed us to observe the changes in the amplitude of the outer race fault frequency as the magnitude of the generated fault increased.

Inner Race Fault Detection
Faults on the inner race are detected less frequently than on the outer race. The main reason is related to the attenuation of the signal as it is transmitted from the inner race, through the rolling elements, lubrication, outer race, and support, until it reaches the sensor. Therefore, when this type of fault is detected it is considered to be more severe than detected [44]. Figure 19 shows an envelope spectrum of a vibration signal associated with an inner race fault for a rotational speed of 500 rpm. It can be seen from the spectrum that the signal behavior is related to the failure mode described in the literature. According to Smith and Randall [36], the failure of this component is manifested in the envelope spectrum by changes in the amplitude of its working frequency generated by excitation pulses from contact between the inner race defect and the rolling elements, showing the harmonics of its frequency (BPFI), with modulation sidebands spaced at the shaft rotation frequency in each harmonic.

Rolling Element Fault Detection
According to Smith and Randall [36], rolling element faults are the most difficult to diagnose, as very few bearings with these faults exhibit the classic symptoms of the envelope spectrum. These classical symptoms are denoted by the presence of two signs, the first manifested as an increase in the amplitude of the characteristic fault frequency (ball spin frequency or BSF) and harmonics, with sidebands modulated at the fundamental train frequency (FTF). The second sign corresponds to low amplitude FTF harmonics.  Another sign attributed to this type of fault is the contained impulse observed in the fault frequency (BSF) sidebands and harmonics [36,45], which behavior is observed in Figure 21. Thus, as the magnitude of the fault of this component increases, the amplitude of both the frequency and harmonics of FTF will increase, as well as the impulsive content of the frequency and harmonics of BSF, as observed in Figure 22.

Conclusions
This study presents the optimization tasks developed to improve the performance of the DAQ unit, focusing on its recording capacity and the accuracy and stability of the data acquired. The results showed an average increase of 60% in DAQ-o data recording capacity, currently having maximum sampling frequencies of 201, 102, 69, and 51 kHz when using 1, 2, 3, and 4 channels, respectively. In addition, there was significant improvement in the accuracy of the data capture time, reaching a constant sampling rate of up to 20 kHz. On the other hand, the standard deviation of sampling frequencies was significantly reduced for sampling frequencies higher than 20 kHz, showing higher accuracy in data capture. The latter cases required additional resampling of the signal, which will be considered in future work.
According to the results, the quality of the power supply and the data type chosen in the programming software play an important role in the performance of a DAQ unit. The power supply ensures that both the RPi and the ADC converter operate at maximum performance, guaranteeing accuracy and stability of the acquired data. On the other hand, it is important to consider the type of data used in the programming software. This should be based on the nature of the acquired data and the accuracy requirements of the system. Handling a data type with greater precision than required will affect DAQ performance in terms of memory management and the time taken to store the data. Therefore, changing the data type from Double to uint was critical to balance data precision, memory efficiency, and DAQ performance. Consequently, it is important to highlight the influence of selecting the correct clock divider according to the operating frequency of the system and the desired sampling frequency in order to increase the stability of the data capture.
The new features of the equipment were validated by capturing data from known waveforms and from signals associated with bearing component failures. In each of these cases there was great data capture performance, both when identifying the known wave frequency and when evaluating the frequency and classic failure modes of the bearing components analyzed. This demonstrated the possibility of developing low-cost, highperformance data acquisition equipment, as well as the viability of implementing them in bearing condition-monitoring tasks.