1. Introduction
Vibration caused by mass imbalance that occurs in rotating mechanical systems is a common problem and entails losses of different types, but they mainly involve friction and wear. These losses translate into poor operation, low efficiency, and energy and economic costs derived from the maintenance or replacement of system elements.
The use of rotating mechanical systems is widespread, especially in the industrial world. We can cite many rotating mechanical systems: turbines, used to obtain electrical energy through hydraulic or thermal energy; compressors that increase the pressure of a fluid while reducing its volume; generators that convert a type of energy (chemical, mechanical, light, etc.) into electrical energy; aircraft engines and engines in general; or wind turbines, among many other applications [
1].
When considering the friction of a rotating shaft in the context of traditional technology, it is important to examine how friction occurs in these types of systems and how magnetic levitation can mitigate or eliminate some of these friction effects. The simplest system that currently exists to limit the vibration of a shaft is through a larger diameter tube, inside which the motor shaft is located. Its movement is physically limited by the tube that surrounds it (see
Figure 1). To further limit the movement of the shaft to be controlled, a lubricating element is placed between them.
Due to the high presence of applications such as those mentioned, there are different systems that allow mitigating the effect of unwanted vibrations, both improving the mechanical performance of the mechanisms and extending their useful life. These systems usually incorporate actuators and control elements, because controlling vibration amplitudes within acceptable limits is crucial to ensuring the safe and reliable operation of mechanical systems. In modern machinery, particularly in rotating components, managing vibrations is vital to maintaining performance and preventing premature wear or failure. To achieve this, rotating elements are often equipped with transducers that monitor vibrations, actuators that can apply corrective forces, and sophisticated control systems that adjust the operation in real time to minimize vibrations. Numerous studies have focused on mitigating the intrinsic challenges associated with rotating systems, particularly in addressing the issue of mass imbalance. While it is impossible to entirely eliminate mass imbalance, researchers have made significant progress in developing methods to reduce its impact. These efforts aim to minimize vibration and other related issues, enhancing the stability, efficiency, and longevity of rotating machinery.
Magnetic shafts are increasingly used in many industrial applications in order to replace rolling elements, which is a great potential option for vibration reduction in rotating machines [
2]. Finding a good control system for the mass imbalance that happens in these systems leads to significant energy and economic savings [
3]. As is well known, levitation consists of keeping an object suspended in the air without any type of mechanical contact. Magnetic bearings are a technology that uses magnetic levitation to hold and rotate a metal object without physical contact [
4]. It is produced due to the repulsion between or through two poles of magnets to attract or repel metallic objects. There are several ways in which the levitation of an object occurs, although not all of them are valid for the levitation of a shaft.
In recent years, there has been enormous research efforts related to the vibration control of rotating devices [
5,
6], which can be classified into two large blocks: (1) active vibration control [
7] and (2) passive vibration control [
8]. Precise control of magnetic fields is crucial for stable levitation and movement. Different technologies have been established to mitigate the effect of vibrations [
9,
10] with the aim of obtaining a good system performance [
11].
While magnetic levitation technology offers advantages in reducing friction because there is no direct physical contact between rotating parts, it also presents challenges related to cost, infrastructure, and control. This reduction in friction contributes to system efficiency, lower maintenance requirements, and better performance in various applications. For instance, in the case of wind turbines, one of the main problems is friction in the turbine rotors, which has a significant impact on the overall efficiency of the turbine. Efforts are being made to improve the design, materials, and maintenance practices of wind turbine rotors to mitigate these issues and ensure long-term reliability and performance [
12].
We should point out that the digital control design developed in this study is only to illustrate an easy and explanatory solution for vibration control of magnetically manipulated rotating shafts. Some previous works have addressed the topic of magnetic levitation from an educational point of view [
13]. Despite being an academic mechanism, the techniques utilized here could be applied to other real and industrial systems.
2. Design of the Prototype
In this paper, an academic and experimental prototype constructed by our research team is presented (see
Figure 2). The model was built with the fundamental components for our purpose, i.e., motor, shaft, electromagnets, and proximity sensors but also with other elements that allow us to obtain interesting data, such as the vibration data provided by the accelerometer or a sensor that allows us to measure energy consumption. A Micro SD (Secure Digital) card reader has also been incorporated to be able to store the data and analyze it later.
In
Figure 2 we can observe the following components:
(1) motor: this allows the shaft to turn; (2) motor shaft joint: being something flexible, it causes the shaft to have some play; (3) shaft: a plastic tube with a metal element at its end in order to be controlled by electromagnets, and another element in the area of the sensors to facilitate its detection; (4) electromagnets: these have to make the levitation of the shaft possible; (5) proximity sensors: these have to provide the information to the microcontroller about the state of the electromagnets; (6) electronic boards: these house various components that enable the microcontroller to control the mechanism.
Through electromagnetic forces, the aim is to keep the shaft, which comes out of the motor, in levitation (see
Figure 3).
Four proximity sensors have been installed, so that each electromagnet depends exclusively on the sensor on its opposite side. The shaft is intentionally imbalanced to induce vibrations on it. The sensors are activated when the shaft approaches them. Then, sensor A controls electromagnet C, sensor B the electromagnet D, sensor C the electromagnet A, and sensor D controls electromagnet B (see
Figure 4). This information will reach the microcontroller that manages the action of the actuators in order to keep the shaft levitating.
3. Control Methods
Since the system is unstable and non-linear, it is necessary to apply a closed control loop (see
Figure 5). In our case, the controller will be a microcontroller, the actuators (electromagnets) will have a direct effect on the system to be controlled (the shaft), and the sensors (proximity sensors) will continuously read the state of the shaft and provide this information to the controller in order to obtain good control of the system.
A printed circuit control board is responsible for managing all the elements involved in the model (see
Figure 6). Thus, this board allows control of the motor, actuators and electromagnets. The circuit control board also allows us to read the proximity, vibrations, and current sensors, as well as interact with different elements such as the microcontroller and the Micro SD card reader.
The system offers two types of control. The first one consists of keeping the opposite electromagnet activated while the sensor is detecting. In this case however, the microcontroller manages each actuator based on its opposite sensor (see
Figure 7). This first control method occurs when the user chooses a pulse duration of 0 milliseconds.
The second method is a control by means of pulses, the duration of which can be modified by the user (see
Figure 8). When it detects that the sensor changes from not detecting to detecting (rising edge), the opposite electromagnet is activated for the programmed milliseconds.
These pulses can last from 1 to 1000 milliseconds. The relationship between the electromagnets and sensors is identical to that described in the previous case.
4. Hardware Components
The characteristics of the prototype components are detailed below.
4.1. DC-DC Converters
The DC-DC converters (Direct Current-to-Direct Current) from AZDelivery company (Bavaria, Germany) have the form of an evaluation board (see
Figure 9), and they serve to convert an input voltage into an output voltage lower than the input.
The evaluation boards used accept a voltage of 3 to 40 V and an output voltage of 1.5 to 35 V. The output voltage is regulated by a potentiometer integrated on the board. Three DC-DC converters have been added, converting the input voltage of 24 V to different output voltages of 12 V, 5 V, and 3.3 V. These converters are used to power:
- (1)
A 24 V DC to 12 V DC converter for the four optocouplers of the electromagnets and the operational amplifier of the current sensor.
- (2)
A 24 V DC to 5 V DC converter for the microcontroller; the motor encoder; the optocoupler for the PWM (pulse-width modulation) control of the motor; the current sensor, and the Micro SD card reader.
- (3)
A 24 V DC to 3.3 V DC converter for the 74HC595 and 74HC165 chips and the accelerometer.
4.2. Microcontroller
The microcontroller chosen to manage all the operations is the so-called ESP-32 from the Espressif company (Shanghai, China). This microcontroller is well known for its low cost and its orientation towards the IoT (Internet of Thinks) and has been used in multiple scientific works, such as in [
14].
In addition, it integrates Wi-Fi and Bluetooth Low Energy, making it very versatile but with some limitations (see
Figure 10). Although the evaluation board works with an input voltage of 5 V, the microcontroller works at 3.3 V. In
Figure 11, we can observe the scheme of the microcontroller.
4.3. Electromagnets
The electromagnets chosen to perform the task of attraction of the shaft, and thus the ability to keep it levitating, are SG Type 58 from SGTransmission (County Durham, UK) (see
Figure 12). For questions to fit the model, size 50 has been selected, which can be powered with a voltage of 12 to 24 V DC, and in our prototype, they are powered at 24 V DC. They can realize an axial force of 750 N using 5.4 W of power. Therefore, the consume is approximately 0.225 A when they are powered at 24 V.
To switch the electromagnets from the microcontroller, it is necessary to incorporate different electronic components so that the transistors that control the electromagnets give saturation values (24 V DC) or cut-off values (0 V DC), according to the command of the microcontroller. The signal coming from the microcontroller is digital and changes from 0 V to 3.3 V DC. To adapt it to the amplitude required by the electromagnet, a MOSFET transistor from VISHAY company (Selb, Germany) was chosen. This allows us to control a high voltage signal with a low voltage one.
In addition, an antiparallel diode has been incorporated, since the electromagnet is a coil and could cause reverse currents when it changes from on to off. In this way, we prevent residual electromagnetism from causing damage to the rest of the circuit due to possible peaks that the coil may generate. In
Figure 13, a scheme of the electromagnets is provided.
4.4. Proximity Sensors
The sensors chosen are CR30 of the Autonics brand (Busan, Republic of Korea) of capacitive type (see
Figure 14), and their inclusion in the prototype is explained by the need to detect at all times what is the state of the shaft in terms of positioning. These sensors can be powered from 12 to 24 V DC, and in our case, they are powered at 24 V DC. Each sensor incorporates three terminals: two of them for power and a third terminal for the signal. This signal indicates the input voltage when the sensor detects an object in its field of action and 0 V if it detects nothing. The signal is also connected to an LED (light-emitting diode) on the sensor itself, in order to see what the detection status is at all times.
These kinds of sensors are adjustable, so we can increase or decrease their radius of action. This adjustment is made using a sensitivity adjuster. Since the microcontroller and the chip operate at 3.3 V, the signal must be adjusted to the same amplitude; thus, the output signal is connected to a voltage divider, which decreases the 24 V signal to 3.3 V, making it compatible with the rest of the circuit. The diagram of the proximity sensors is presented in
Figure 15.
The values of the resistors
,
have been calculated using the following formula:
considering that the input voltage (
Vs) is 24 V and that we want an output voltage (
Vout) of 3.3 V, a value of one of the resistors is fixed, and by means of the formula, the other value is found.
Since the control and management of these elements were implemented using 74HC595 and 74HC165 chips from Texas Instruments (Dallas, TX, USA), it was necessary to utilize the shiftOut and shiftIn functions. Upon analysis, it was observed that shiftOut and shiftIn functions internally rely on digitalRead and digitalWrite to accomplish their tasks. All of these functions are part of the Arduino libraries.
To control these elements, a function called UpdateMagnets has been created, which is located within the time interrupt and is executed every millisecond. It writes the state of the actuators based on the last reading of the sensors, in the previous millisecond, and then it reads the sensors before exiting the interrupt.
As mentioned above, there are two methods of controlling the magnets: using pulses or not. The way to change from one to the other is by modifying the Pulse Time parameter. If it has a different value than 0, the electromagnets will operate via pulses of duration determined by the user. If the value is equal to 0, the electromagnets will act by paying attention to the sensor opposite them.
4.5. Accelerometer
To analyze the effect of the electromagnets on the shaft and the motor, an MPU6050 accelerometer evaluation board from TDK InvenSense (San José, CA, USA) was incorporated, with the intention of seeing how the vibrations are produced when the electromagnets work (see
Figure 16).
The board has been placed in the area where the motor is coupled with the joint that connects the shaft. It is an accelerometer and gyroscope with 6 degrees of freedom that also incorporates a temperature sensor. This accelerometer operates on a 3.3 V DC power supply and communicates with the microcontroller. Regarding the hardware, it was not necessary to add any components between the microcontroller evaluation board and the accelerometer board. Although pull-up resistors are typically required, in this case, the microcontroller already had internal pull-up resistors, which can be activated via software.
To read the values provided by the accelerometer, we only need to use two libraries: Wire for I2C communication and MPU6050_tockn to interact with the accelerometer. In this I2C communication, the microcontroller serves as the master and the accelerometer as the slave. By utilizing the device library, we can easily declare a variable as an MPU6050 structure and then initialize the I2C communication and the accelerometer using the Wire.begin and mpu6050.begin functions. In the main loop, the values are updated with the mpu6050.update function. Finally, the mpu6050.getXXX functions are used to retrieve the various sensor values from the MPU6050, such as acceleration, gyroscope data, or temperature readings. These retrieved values can then be processed and written to a file for further analysis or logging purposes. This approach allows for efficient data collection, enabling the system to monitor motion and orientation in real time and store the information for later review or use in control algorithms.
4.6. Current Sensor
To evaluate the changes in electrical consumption caused by the activation or lack of activation of the electromagnets, together with the motor speed, a current sensor has been incorporated at the input of the model. A prototype board was used (see
Figure 17), which accepts a maximum intensity of 5 A, with a sensitivity of 185 mA/V, following a linear pattern between the input intensity and voltage (see
Figure 18).
To achieve the best possible reading, the signal was adjusted to vary between 0 V and 1 V. This adjustment was accomplished using a voltage divider, along with the incorporation of a decoupling capacitor for the microcontroller input, with the aim of reducing noise as much as possible. Additionally, an operational amplifier configured as a voltage follower was incorporated to prevent the sensor signal from dropping when connected to the microcontroller. A pull-down resistor was also added to stabilize the signal.
The sensor reading was obtained via one of the ADC (analogic-to-digital converter) on the microcontroller. However, the ADC is one of the slower components compared to the ESP32. It exhibits a differential non-linearity error of ±7 LSB (least significant bits), which means only 9 bits of monotonicity can be guaranteed. Even though the Espressif manufacturer recommendations were followed to optimize the reading process, the results are not entirely accurate. For this reason, the readings of the sensor are not offered in this study.
4.7. Motor and Its Control
The motor chosen to rotate the shaft is PD3557-24-5 from Transmotec company Alicante, Spain (see
Figure 19), a direct current motor that can be powered up to 24 V.
It has a 5:1 reduction gear and a nominal speed of 990 rpm at 24 V. To control the operation of the motor, a prototype board with an H-Bridge was incorporated between the motor and the microcontroller (see
Figure 20). An encoder was also used, which was powered at 5 V (see
Figure 21).
In order to control the motor from the microcontroller, a PWM output is employed. The PWM signal is sent to the H-Bridge board, which adjusts the voltage supplied to the motor accordingly. Since the microcontroller operates at 3.3 V and the H-Bridge at 5 V, a high-frequency optocoupler was included to match the signal levels between these two components. To protect the LED inside the optocoupler, a limiting resistor was added, along with a pull-up resistor on the transistor’s collector. Additionally, pull-up resistors were required for the A and B signals from the encoder, as these signals were directly fed into the microcontroller. In
Figure 22, a diagram of the motor control is provided.
4.8. Micro SD Card Interface
To store the information of the accelerometer, the current sensor, and the parameter of the motor, a board was incorporated into the model evaluation of a Micro SD card, since the capacity of the microcontroller did not allow it to store the desired amount of data. In this way, the possibility of extracting already-stored data is also offered.
The board is powered at 5 V and communicates via the protocol SPI communication (serial peripheral interface), consisting of 4 lines:
- -
MISO: data signal (Master In Slave Out)
- -
MOSI: data signal (Master Out Slave In)
- -
SCLK: clock signal
- -
CS: chip selection signal
In order to obtain the correct operation, a pull-up resistor was incorporated in the MISO line.
5. Software
To design the control software for the prototype, we used Arduino IDE (v.1.8.19) (integrated development environment). Although the IDE is relatively simple and does not support breakpoints, it is widely recognized and used globally. As a result, there are a large number of libraries and example codes available online, which greatly facilitated the development process. This, combined with the widespread popularity of the chosen microcontroller, significantly facilitated the development of drivers and libraries for the software.
With the idea of offering a simple and fast environment for controlling the mechanism and subsequently managing the data obtained, a solution without cables was chosen, due to the microcontroller Wi-Fi connectivity. The ESP32 microcontroller acts as an access point, but this network is restricted to a single device connection to safeguard the components of the prototype and prevent conflicts between multiple users. When a device connects to this network, the microcontroller also functions as a web server. Upon accessing this website, the user is presented with a page designed primarily using HTML (hypertext markup language) and the computer language CSS (cascading style sheets) for the layout of buttons and tables, along with a small JavaScript script to send a JSON (JavaScript object notation) string to the server/microcontroller.
The website displays the current status of various parameters and options, enabled by the seamless interaction between the code of the microcontroller (written in C and Assembly) and the web code. The microcontroller, functioning as a web server, dynamically sends specific HTML lines that reflect the state of its internal variables. Additionally, user interactions on the web page can directly modify these variables, ensuring real-time updates and control.
The page allows the user to modify the status of the motor, magnets, and file via GET requests to the server, as well as to download or delete files. Through a POST request, users can change motor control parameters and the duration of the pulses on the magnets by sending a JSON string to the server with the relevant elements and parameter values.
The web interface consists of two main screens: one for controlling the model and another for managing stored files, although file management can also be achieved by removing the Micro SD card from its reader.
To incorporate all the functionalities into the software, the following libraries were used: Wi-Fi, Wi-FiAP, ESP32WebServer, ESPmDNS, and ArduinoJson.
6. Experimental Results
In the developed model, the proximity sensors have the following electronic characteristics: sensing side diameter: 18 mm; sensing distance: 15 mm; setting distance: 0 to 10.5 mm; and maximum current consumption: 15 mA. On the other hand, the mechanical components have a shaft housing inner diameter of 2.2 mm and a shaft diameter of 1.5 mm. These specifications indicate that the sensors are able to detect objects within a specific range (up to 15 mm) with a setting distance that allows for adjustments within 0 to 10.5 mm. The prototype design indicates that the sensors are well suited for applications that demand precise detection in confined spaces. Their low current consumption of 15 mA contributes to energy efficiency, which is essential to reducing the overall power requirements of the system. There is no change in the motor voltage when controlling shaft vibrations. In fact, the motor speed remains constant at 990 rpm at 24 V, regardless of the shaft vibration.
As is well known, a capacitive sensor detects changes in the capacitance between the sensing object, a shaft in our case, and the sensor. The amount of capacitance varies depending on the distance of the sensing object. This change in the dielectric constant causes a change in capacitance. The sensor detects this change and converts it into an electrical signal that can be used to activate a switch, send a signal to a microcontroller, or perform some other control function.
In our experiment, shaft vibration corresponds to the distances between the shaft and the shaft housing, although it can be interpreted as a vertical type of vibration as shown in
Figure 4. These distances are measured indirectly, at all times, by proximity sensors that emit a signal in volts. This signal indicates the input voltage when the sensor detects an object in its field of action and 0 V if it detects nothing. The vibration control of the shaft is carried out by means of electromagnets, which are controlled by the microcontroller based on the information emitted by the proximity sensors, and they perform the task of attracting the metal shaft to keep it levitating.
After assembling the components of our mechanism based on the parameters discussed above, the mechanism was put into operation to check how the vibration controller that had been designed and programmed behaved. The signal data were captured using a PicoScope data acquisition card. The vertical axis Y of the resulting graph displays a scale ranging between ±3.3 V. The controller was activated at 5 s, 15 s, and 30 s, approximately, and deactivated at around 0 s, 10 s, and 20 s, given on the X axis. The data clearly indicate that when the controller is activated, the voltage oscillation significantly narrows to within ±0.2 V. In contrast, when the controller is deactivated, the voltage oscillation widens, reaching approximately ±1.5 V, demonstrating a substantial reduction in stability.
In
Figure 23, it can be clearly seen how the vibrations are significantly reduced when the electromagnets act. This outcome confirms that the model designed and constructed according to the specified guidelines effectively reduces the vibration amplitude of the shaft. The reduction in voltage oscillation can be directly correlated to a decrease in physical vibration, with the voltage scale corresponding to a specific vibration amplitude, which can be measured in millimeters, if necessary. This relationship allows us to translate the observed voltage changes into tangible reductions in vibration, illustrating the effectiveness of the controller in stabilizing the system. Although failures may occur during the operation of any mechanism, requiring rapid detection and severity estimation to ensure proper functioning, this aspect was not considered in the scope of this work.
We would like to emphasize that the digital control design presented in this paper, along with the accompanying prototype experiment, is primarily an academic system. Its purpose is to illustrate a straightforward and effective solution for vibration control in magnetically manipulated rotating machine shafts, using low-cost advanced digital technology. This experiment is specifically designed to provide a clear visual demonstration of vibration control, making it highly suitable for educational purposes.
7. Conclusions
In this paper, a control system for an academic prototype was designed to magnetically manipulate a rotating shaft. Our experiments demonstrated that this controller effectively mitigated the vibrations of an unbalanced rotating shaft. We believe that an experimental design can serve as an illustrative tool for teaching mechatronics to engineering students with prior knowledge of basic electronics, mechanical concepts, and microcontroller theory. However, the same methodology could potentially be extended to real-world applications, such as wind turbines or other rotating machinery with high friction.