There are several interested parties for information on the current state of the rotary machine. First, it is the staff in charge of maintaining the machines. However, the management of the organization may also be interested in order to better organize and plan further activities and costs of the company. That is why we decided to send the data on the state of the machine to the cloud platform immediately after obtaining the results. In this way, we ensure the immediate availability of information to all stakeholders, regardless of where they are currently located. It is enough for them to have an Internet access and a suitable device (computer, tablet, mobile phone…) to access the cloud platform and stored data.
However, the data transfer between the estimating device located on the observed machine and the cloud platform is not always completely reliable. Namely, it is possible that the Internet access service provider does not work during some period. In addition, interruption of the mobile operator signal through which we establish a GPRS connection is possible. Finally, there may be a problem with the GPRS modem or the SIM card. For this reason, information about the results of signal processing and estimation of the machine state is displayed on the LCD screen, so that the operator instantly has information about the result. Moreover, the recording is stored on the SD memory card of the device, so it is possible to repeat the process of audio signal processing later and get an estimation of the machine state at the time of recording.
3.1. Hardware Implementation
The device we present in this paper is intended to work in an industrial environment and therefore must meet a number of conditions. First, it must be as small as possible, resistant to adverse working conditions in the environment, autonomous, portable, easy to install and use, and a modest consumer of electricity.
A small and light device would take up little space and interfere less with the usual working environment around a rotating machine whose condition it needs to estimate. Since this is mostly an estimation of the industrial machines, working and ambient conditions are often unsuitable for the operation of electronic devices. The presence of abrasive substances and dust, exposure to low and high temperatures, as well as their rapid changes, the danger of mechanical influences caused by force majeure or insufficient attention of the operator, cause the designed device must have a high dose of resistance and protection from these influences.
A device of this type and purpose is usually designed to be used on different machines, so it must be easily portable and autonomous in its work. This means that it must also have an autonomous power supply that will ensure long enough operation between two battery charges. Finally, since the device is portable, it is necessary that its installation and commissioning be simple so that it can be performed by a less skilled user.
After the initial consideration of the most suitable platform for the realization of the device for acoustic signal acquisition and processing, we decided to use the Raspberry Pi (RPi) platform [32
]. First, it provides sufficient processing power to perform the required tasks. In addition, unlike many microcontroller platforms, it works like a regular computer with an operating system, which significantly facilitates software development, integration of hardware components and shortens the time required for implementation. Last, but not least, for our specific application, it allows easy utilization of large storage space.
Namely, acoustic signal recording produces relatively large files that need to be recorded somewhere for possibly later processing. If we also want to keep earlier recordings for comparisons and later additional analyzes, the requirements for storage space are growing rapidly. Managing such files is an additional challenge if we do not have operating system support.
RPi uses an SD memory card as a storage device. It provides space for an operating system with all the available software applications. It also uses the same memory card to store files that are the result of the user’s work. There are several supported operating systems, but in our implementation, we used Raspberry Pi OS (formerly called Raspbian) [33
], which is a scaled-down version of the Linux operating system, adapted to run on RPi. The Raspberry Pi OS with desktop and recommended software takes up just under 4 GB on the memory card, but the need for space grows with the installation of additional software applications and tools. That is why we used a 32 GB memory card in our implementation. It turned out that this memory capacity is enough to install all the necessary programs and tools, as well as to store recordings from a number of acquisitions.
Acquisition of the acoustic signal is performed using a small and affordable commercial microphone, model AK5371, which connects to the microprocessor platform via a USB port. The quality of the microphone certainly affects the quality of the recording, and thus the quality of the obtained information about the condition of the machine. However, in the initial phase of the research, we found that with the help of a small, portable and affordable microphone, as we use in our system, we could get quite relevant results [34
]. An additional advantage of the used microphone is a built-in A/D converter, which further facilitates its integration into the system.
During the development of the device and its initial commissioning for testing purposes, it was necessary to achieve a simple and efficient interaction between the device and the user. In order to make sure that the device works properly in certain phases of operation, the simplest way was to display certain messages to the user. An LCD screen commonly used in industrial applications has been used for this purpose. This LCD is easy to manage through the I2C communication interface, it is a small energy consumer and it is possible to display enough information.
On the other hand, the control of the device in order to issue the appropriate commands is performed by means of two buttons, also intended for industrial applications. This means that they are resistant to dust, moisture, abrasives and similar potential hazards that can be encountered in an industrial plant. With these buttons, the user navigates through the application menu, and starts or stops certain tasks.
Components of the device for acoustic signal acquisition and processing and their layout in practical implementation are shown in Figure 8
. Only the power bank and SD card are not visible. SD card is inserted at the bottom of the Raspberry Pi, and the power bank is accommodated at the bottom of the box, under the plastic divider that separates the power supply and electronics. The list of components used for the implementation of this device, together with the most important characteristics and approximate price, is shown in Table 2
The device (the mentioned components) is packed in a plastic box, 3D printed of high-quality plastic, resistant to the high temperatures. Initially, it was planned to mount the device on the rotary machine using strong magnets. However, after the experience in the initial design phase, we gave up on such a solution because it turned out that we would have huge problems with the temperature and vibrations that produce rotary machines in an industrial surrounding. Therefore, we decided to mount the device on the machine using the bracket made of metal construction (Figure 9
, left), which is fixed to the construction of the machine by the screws (Figure 9
, right). Using a rod of appropriate length, which is mounted on the body of the bracket, the microphone approaches very close to the surface of the machine, while the device itself is far enough to avoid the heat impact to the body of the box and electronic components inside.
The application that runs on the Raspberry Pi is written in the Python programming language including some of the publicly available libraries. Some of them are: RPi.GPIO (for operations with general purpose input/output ports), PyAudio (for operations with audio signals and files), NumPy (for working with arrays and numerical calculations). This application starts when the operating system is booted, that is when the device is turned on. In the development and testing phase of the device, the application works by offering the user a choice between acquiring a new acoustic signal and processing already recorded acoustic signals in the form of audio files.
If the user selects the acquisition of a new audio signal, the recording of the signal captured by the connected microphone begins. The PyAudio library [35
] is used for recording, which can be used to easily record and play audio signals on various platforms, including the Raspbian operating system. Recording is performed with a frequency of 48 kHz and a resolution of 16 bits. The duration of the recording is limited to five minutes, and in the processing phase it is software-wise divided into smaller pieces, more suitable for processing.
Since the device for acquisition and signal processing should work in industrial conditions, where it is not always easy to bring the power from the public grid to this device, a power bank is used as the power supply. Most of the device’s components are small consumers of electricity. However, one of the components is the GSM/GPRS module, which sends the data to the cloud. During the activation of this module, it is necessary to provide a current of close to 2 A, which is a limiting condition for choosing an adequate power source. In our prototype, we use a Xiaomi Power Bank 3 [36
], which contains a Li-polymer battery with a capacity of 10,000 mAh. Our device is powered via a USB-A port of a power bank that delivers 5.1 V and provides 2.4 A.
3.2. Communication between Device for Acquisition and Cloud Platform
As mentioned earlier, the communication between the acquisition device and the cloud platform is an important segment of the proposed system. In the initial phase of development, there was a dilemma whether to transfer recorded files and perform processing on the cloud (or at the user’s server) or should perform all processing on the acquisition device and send only the obtained estimation of the machine state. Based on the experience regarding the size of the recorded files and considering the characteristics of the GPRS connection, we decided to apply this second approach [37
]. Thus, the amount of data transmitted over the GPRS connection is very small, which reduces the possibility of communication problems, as well as its costs. On the other hand, reliability increases because information about the state of the machine can be obtained immediately, on the spot, even if the communication with the cloud platform does not work properly.
In the implementation of the proposed system prototype, we used the GSM/GPRS communication module Waveshare GSM/GPRS/GNSS HAT [38
]. This module is adapted for use with RPi microcomputers, which greatly facilitates system development. It can be connected to RPi in several ways, and in the current implementation, a USB connection is used. RPi 3B has four USB ports available, and our device requires two: one for microphone connection and the other for a GPRS module (see Figure 8
Using the USB port makes it much easier to establish communication with the GPRS module. The programmer just needs to include the serial
library in the Python code (line 2 in Figure 10
). After that, the communication with the corresponding device has to be opened and the communication speed is set. Then, the corresponding AT commands in the form of strings are sent to the module via a set of “write
shows a part of the program code for sending data about the state of the observed machine to the mentioned cloud portal. The parameters shown (apn
, and password
) refer to the local mobile Internet provider. Instead of the asterisks in line 16, the proper key for writing to the particular node of the cloud platform must be entered. Information on the estimated machine state is in the variable state_estimation
. We send this information to the cloud using the GET method. This process begins with the command in line 14 by the initialization of the HTTP request and is finalized with the command in line 19.
illustrates a diagram from a cloud platform that depicts information about the state of a rotating machine. As one can see from the figure, this diagram, and thus the information about the condition of the machine, can be downloaded and viewed by any device with Internet access, even on a mobile phone.