Overview

Machinery vibration is usually the best indicator of overall mechanical condition. It is used in preventive and corrective maintenance.

It can be measured using displacement and velocity transducers, and accelerometers. You can get an overall reading indicating the maximum value of vibration, but the most useful information is obtained with a FFT spectrum analysis of a time period reading.

Machinery vibration analyzers are usually expensive and complicated and many small and medium sized industries can't afford this instruments, particularly in my country (Bolivia).

Open source hardware and software tools are very accessible this days, and a simple, inexpensive and open source FFT spectrum analyzer can be easily built using some of this tools.

Description

For this project, an Arduino Nano is used as the data acquisition system, it contains an USB to serial converter and ADC channels. A common accelerometer, the ADXL335 is used as the transducer for vibration measurement, and a computer is the FFT analyzer, using Python and Numy, Scipy and Matplotlib libraries.

A system diagram is shown below.

The Arduino Nano listens for an incoming command from the computer, that tells it to start or stop sending ADC readings. The ADC reads the accelerometer vibration channels on a given sampling frequency (5000 Hz), controlled by one of the micro controller timers. This readings are sent on the serial port at a speed of 0.5 Mbps.

The Arduino Nano program (adxl335_01.c ) is compiled with Avr gcc, and programmed using Avrdude and the Arduino Bootloader installed in the atMega328 microcontroller. The Arduino libraries and IDE are not used.

The ADXL335 is a small, thin, low power, complete 3-axis accelerometer with signal conditioned voltage outputs. Maximum bandwidth is selected for the application, with a range of 1600 Hz for the X and Y axes. The Z axis maximum range is 550Hz, and is not used because the limited range, but it is wired to the micro controller in case it is used in the future.

A circuit diagram is shown next.

The computer controls the data acquisition sending commands to start or stop the transmission of samples. The program counts the amount of data received and the amount of data it needs (sample size). When the necessary amount of data has been taken, a command to stop is send to the microcontroller. Pyserial is the python library used to control the serial communication.

The serial communication is binary based and a mechanism to mark the end of packages is necessary. A PPP type byte stuffing algorithm is used for this. In PPP frame boundaries are marked with a reserved byte value 0x7E. This reserved value is not permitted to occur in any other place than frame boundary. In a case the reserved value should occur in data packet, an escape sequence is used to transfer 0x7E into byte sequence of 0x7D, 0x5E. The byte value 0x7D means that a possible escape follows and is called a Control Escape value. Also the Control Escape itself needs to be escaped and becomes to byte sequence of 0x7D, 0x5D.

This PPP framing algorithm is used in the Arduino Nano and on the python program for the computer.

There are two python programs, one for data acquisition from the serial port and saving that data, and the second for file opening, plotting of data and FFT spectrum calculation and plotting.

Program serial_avr_01.py sends commands to the Arduino and reads data from the serial port. Once the desired amount of data has been acquired, it is saved on a file, as text, separated by comas and delimited by tags.

Program acel_file_plot_02.py waits for a file name introduced on console, opens the file and plots the signal from the accelerometer. It is shown on the next picture.

Then, the FFT spectrum is calculated and plotted. It can be seen in the next picture.

This images correspond to a motor running at 1450 rpm (24.17 Hz). It can be seen that the peaks in the FFT spectrum are multiples of this frequency (24.17, 48.33, 72.5, 95.67, 120.83 and so on).

This images correspond to a motor running at 1450 rpm (24.17 Hz). It can be seen that the peaks in the FFT spectrum are multiples of this frequency (24.17, 48.33, 72.5, 95.67, 120.83 and so on).

So far, the system performs as expected, but some work has to be done on the signal scaling. This has already been corrected, see log number 2.

Hackaday Prize 2016 - Citizen scientist

Usually test equipment (FFT spectrum analyzer) for machinery vibration analysis is expensive and complex, has too many features and requires a specially trained user. Many small industries that have rotating machinery, also have a maintenance program and personal, but lack a spectrometer, easy to use and inexpensive, good enough for routine maintenance.

The citizen scientist challenge was chosen, because this project attempts to make this type of instrument (FFT spectrum analyzer) more accesible, and help expand the frotiers of knowledge in the field of machinery vibration measurement and analysis.

All hardware and software used to build this project is open source and readily available. The components can be bought on ebay (where are very common), and the software can be downloaded from the corresponding web pages. The software is also multiplatform and can run on Windows, Linux and Mac.

Repositories

Open-source licenses

Project license

This project is under the MIT License (MIT) https://opensource.org/licenses/MIT

Copyright (c) 2016, Ariel Quezada

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.