A speed measuring system of hermetic centrifuge

. Based on the detected vibration signal, a measurement system was designed to solve the current problem of closed centrifuge speed measurement. The system collected and adjusted the signal collected by the vibration sensor, and then send it to the control unit STM32 for spectrum analysis to get the speed frequency. The sampling data was analysed and processed in PC through serial communication. Programs were written to achieve data sampling, filtering and storage, and the important parameters such as acceleration waveforms, vibration frequency and actual speed were displayed on the screen. The experimental results show that the system can accurately calculate the real-time speed of the closed centrifuge according to the measured vibration signals, which has the advantages of high stability, detection accuracy and real-time performance.


Introduction
The main function of the closed centrifuge is to separate liquid and solid particles or liquid mixture with the liquid components. It is widely used in various fields such as pharmaceutical preparation, petroleum purification, food production and mineral processing, which is indispensable in industrial production. It is of great significance to measure the speed of the centrifuge accurately since the speed immediately affects the quality of the product. The traditional speed measurement methods need to disassemble the centrifuge first, and then install the sensor inside it. There will be significant differences in the installation method because of the various centrifuge structures. At present, two main methods are proposed to measure the rotation speed of enclosed centrifuges at home and abroad: photoelectric and electromagnetic. For example, the photoelectric speed measurement method is to paste a piece of reflective paper on the measured shaft of the centrifuge, and the photoelectric sensor detects the reflected light signal and generates the corresponding pulse signal. The speed of the rotating shaft can be obtained by counting the number of pulse signals per unit time. On the other hand, the electromagnetic speed measurement method is to fix the magnet on the inner wall of the closed centrifuge and install an electromagnetic sensor on the centrifuge shaft. When the electromagnetic sensor rotates the magnet, it will output a pulse and the speed of the centrifuge can be determined by calculating the number of pulses per unit time. The photoelectric method has a simple structure, prompt response and high sensitivity, but it needs to destroy the original structure of the closed centrifuge for perforation, which has potential safety hazards. Moreover, this method has poor accuracy and precarious character since it is susceptible to the light intensity and light reflection angle. In contrast, the magnetoelectric method can measure the speed of centrifuge without observation holes, but this method is susceptible to external electromagnetic signals, and the occasional error makes the measurement accuracy cannot be guaranteed. In order to solve the problems of existing methods, this paper designs a closed centrifuge speed measurement system based on the principle of vibration measurement. The idea of this method is to perform FFT (Fast Fourier Transformation), the frequency with the largest amplitude in the obtained spectrogram is the rotation frequency of the centrifuge, from which the rotation speed of the centrifuge can be calculated. After filtering the measured signal, the time-domain signal is almost a standard sine wave, and the most energetic component of it is the periodic vibration signal generated by the rotation of the centrifuge.

Structure design
This system is mainly composed of a vibration sensor, signal conditioning module, data acquisition module, software analysis platform and data display, as shown in Figure 1. The vibration sensor is directly attached to the shell of the centrifuge through a magnet, and the vibration signals of the centrifuge are collected in real-time and converted into voltage signals. The signal conditioning module not only filters the voltage signal but also provides the constant current source power supply for the vibration sensor. The STM32 controls the data acquisition chip to carry out high-speed A/D conversion of the voltage signals, and then saves the data in the buffer array. The vibration frequency, effective speed value and other important parameters are calculated by the STM32 using different algorithms. The LCD (Liquid Crystal Display) displays acceleration waveforms and velocity waveforms in real time. Cording to the requirements of local, parameters could be adjusted by multifarious parameter adjustment buttons displayed on LCD. Finally, the data is transmitted to the PC for further analyses and processes with the direct memory access function of STM32.

Vibration sensor
This system selects HN400A100 piezoelectric acceleration sensor as the vibration sensor, which has the advantages of high sensitivity, wide dynamic range, good timeliness, and strong anti-interference ability. The operating temperature range is -40~+120 ℃ , the frequency range is 0.5~10kHz, the measurement range is ±500m/s 2 , the sensitivity is 95mV/g, and the working current is 2~10mA, that is suitable for the detection of closed centrifuges' vibration signals.

Signal conditioning circuit
The functions of the signal conditioning circuit have the follow three main parts. To begin with, it provides 4mA constant current source to power the acceleration sensor. Secondly, this module filters out the DC bias component contained in the output signal of the acceleration sensor to achieve AC coupling. Furthermore, it follows the input voltage signal to enhance the load capacity of the circuit. The signal conditioning circuit is shown in Figure 2.

DC power supply circuit
The system uses the LM334 chip to build a 4mA constant current source circuit. This chip is a three-terminal programmable current source with a wide input voltage range and output current range. The size of the current output is determined by the external resistances. According to the datasheet, the size of the output current is:

Active high pass filter circuit
The acceleration sensor moves the AC output with a certain DC bias voltage, so that the output of the sensor is always maintained as a positive value, which avoids the need for dual power supplies to drive the sensor. However, the industrial ground only needs AC signals that carry vibration information resulting in the elimination of the DC offset. This system uses a coupling capacitor 2 C , resistors 6 R , 7 R and 8 R , and operational amplifier to form a first-order active high-pass filter circuit for removing DC bias. The cut-off frequency can be calculated by the equation: ( ) After the signal is filtered, it enters the voltage follower composed of chip OP07CDR that has advantages of extremely low input offset voltage, wide voltage input range and excellent common mode restraining performance. The voltage follower has two functions: one is to increase the driving ability of the circuit to the capacitive load for maintaining the stable operation of the circuit and avoiding self-oscillation; the other is that the voltage follower has the characteristics of high input impedance and low output impedance to isolate the front and rear circuits greatly. Finally, a resistor 10 R is reserved in the circuit to adjust the gain. The appropriate resistor can be selected according to the accuracy and range of the analog-to-digital converter to achieve the effect of signal distortion-free amplification.

Control module and data acquisition module
This system selects the STM32F407 chip as the control unit. This chip integrates 1MB of Flash and 192KB of SRAM to ensure that data and parameters could be stored completely. Its core is Cortex-M4, operating frequency up to 168MHz, with a single-precision floatingpoint unit, supporting all single-precision data processing instructions and data types, which is a critical factor for realizing FFT calculation. The data acquisition module uses the AD7606 chip. The reason for choosing this device is that it has excellent DC accuracy and AC performance. The sampling rate of each channel can be up to 200kHz at the same time. It also integrates a second-order Butterworth filter, sample-and-hold amplifier, and the input clamp protection circuit to meet the requirements of fast and high-precision acquisition of vibration signals.

Control module and data acquisition module
The power module needs to address five voltage domains: 3.3V domain, +5V domain, -5V domain, 2.5V domain and 24V domain. First, the external 24V direct current passes through the XL2596-5.0 device to generate a 5V domain to provide power for AD7606 and LCD. Then the linear regulator AMS1117 reduces 5V to 3.3V to provide normal operation of the STM32. The ICL7660 chip generates the -5V voltage required by the operational ITM Web of Conferences 47, 01018 (2022) CCCAR2022 https://doi.org/10.1051/itmconf/20224701018 amplifier OP07CDR through the 5V voltage. The 2.5V domain is generated by the voltage regulator diode LM285-2.5 as the external reference voltage of AD7606. In order to ensure that the sensor is not affected by external voltage fluctuations, this system first uses the SX1308 chip to increase the 5V to 28V, and then adjusts it to 24V through the U-78L12-JL chip. This pure 24V domain supplies power to the LM334 current source. The power module circuit diagram is shown in Figure 3.

System software implementation
The software design mainly includes three parts: the main program, offset value adaptive algorithm and external interrupt program. Its main function is to realize vibration data collection and filtering, vibration frequency calculation, waveform display and data upload.

Main program
The main program first initializes the timer, AD7606, LCD and EXTI0 modules, configures the screen parameters and sampling parameters, and then starts the LCD for calibration. When the system gets ready, this program performs A/D conversion, data filtering, and serial port sending tasks in a loop, Besides, it uses the ST official FFT function to operate spectrum analysis on the vibration signal. Finally, the obtained vibration frequency and real-time speed are displayed on the LCD. The main program flow chart is shown in Figure  4.

External interrupt program
After AD7606 starts to work, the BUSY pin continues to output a high level. When the data conversion is completed, a falling edge signal will appear on the BUSY pin. At this time, an external interrupt service routine will be triggered. STM32 reads the result of 16-bit data conversion through the data port. When the number of acquisitions reaches the set value, the acquisition completion flag is set to 1 and the interrupt flag is cleared. Then the ITM Web of Conferences 47, 01018 (2022) CCCAR2022 https://doi.org/10.1051/itmconf/20224701018 microcontroller filters and calculates the data. The external interrupt flow chart is shown in Figure 5.

Eliminate the offset
The result obtained by the A/D conversion contains the error caused by the zero drift. This article uses software compensation to eliminate the zero drift before the spectrum analysis. First estimate whether the sensor is in a static state. The estimate method is to make a difference between the collected data and the average value. If the difference is within a very small range, it is considered to be a static state at this time, and this average is the numerical amount of zero drift. The zero drift can be eliminated by subtracting the average value from the digital quantity collected in the non-stationary state. The flow chart of the offset value adaptive algorithm is shown in Figure 6.

System test and conclusion
Although there are many types of closed centrifuges, their components are similar, generally including base, shell, drum, large plate and motor. Among them, the motor is the main part of the centrifuge, and the vibration signal of the housing is generated by the rotation of the internal motor. The motor used in the centrifuge is basically a brushless DC motor, so this article uses a brushless DC motor to simulate a closed centrifuge. The experiment process is to install the brushless DC motor in a closed casing. Then attach the acceleration sensor to the appropriate position of the centrifuge casing through the magnet and start the motor to experiment. The sampling frequency is set to 2kHz and the vibration signals are collected cyclically. The calculation results are presented in two display modes, on-site LCD and remote PC. The LCD display result is shown in Figure 7. From the figure, it can be seen that the motor vibration frequency is 74.2Hz, and the speed is 4452r/min. The motor model used in the experiment is DC4260, which has the function of Hall speed measurement. The motor rotates to output 12 square waves. Figure 8 shows the output waveform of the Hall element, which is a square wave signal with a frequency of 891.37Hz. At this time, the actual speed of the motor is: 891.37 12 60 4456.85 / min n r = ÷ × = The error with the calculation result of the system is extremely small, which proves the feasibility of the system.

Conclusion
This method indicates that it only needs to adsorb the vibration sensor on the surface of the shell, without destroying the original closed structure of the centrifuge. The speed of the centrifuge can be calculated from the measured vibration signals which solves the problems encountered in the real-time measurement of the speed of the previously closed centrifuge. The results of the study have shown that this system has good application value results in more convenience for the staff to judge the fault situation.