DC Motor Speed Control System with PWM (Pulse Width Modulation) Technique Based on Arduino For Centrifugation Equipment Application

A DC motor speed control system with Arduino-based PWM (Pulse Width Modulation) technique has been realized for centrifugation applications. Tool design consists of hardware and software. The hardware used is Arduino Uno, brushless DC motor, ESC (electronic speed control), optocoupler, 4x4 keypad, and seven-segment, and the software used is Arduino IDE. The working principle of this tool is that Arduino will process input from the keypad and provide a signal to the ESC (electronic speed control) to drive a brushless DC motor. The optocoupler sensor will detect motor rotation, and the data obtained will be displayed on the seven segments. This tool works with a speed range of 4,000 to 7,000 RPM. Rotational speed testing has been carried out using the DT-2234C+ tachometer. The test results show the highest error occurs at a speed of 5,000 RPM which is 3.62% and the lowest error occurs at a speed of 6,000 RPM at 1.01%.


Introduction
A laboratory, often known as a lab, is used to make measurements, observations, research, or scientific research related to science (chemistry, physics, and biology) and other sciences (Emda, 2017). The laboratory is equipped with various kinds of equipment used to support the activities carried out in the laboratory. Some laboratory tools often used are hotplate stirrers, laboratory shakers, and centrifuges.
A centrifuge is a tool widely used to separate compounds with different molecular weights by utilizing centrifugal force (Majekodunmi, 2015). The magnitude of the resulting centrifugal force depends on the motor's rotational speed. The higher the motor's rotational speed, the greater the centrifugal force generated. To determine the length of the motor rotation process, the centrifuge is equipped with a motor rotation speed setting and is also equipped with a timer (Saputra, 2017).
The motor used in this study is a Brushless DC Motor (BLDC). Brushless DC motor (BLDC) is a type of synchronous motor. A brushless DC motor uses the principle of attraction between two magnets with opposite poles or repulsion between two magnets with the same pole (Akbar & Riyadi, 2019). Brushless DC (BLDC) motors have advantages, including increased efficiency, reduced noise generated when rotating, cheaper maintenance, and can rotate at high speed. BLDC motors are widely applied in everyday life, such as household, industrial, and health equipment (Miftaahul et al., 2019). Margirahayu et al, 2022/ J. Energy Mater. instrument. Technol. Vol. 3 No. 3, 2022 In a previous study, research on centrifuge tools was carried out by Saputra (2017). This study makes a centrifuge with a fixed angle rotor based on the AVR Atmega 8 microcontroller. The results obtained in this study are that the rotor speed is still at the permissible tolerance value of less than 10% and the sample separation is at a speed of 3,000 RPM. However, in this study, the electric motor is used for sewing machines so that when the centrifuge is used at speeds above 2,500 RPM, the motor becomes hot quickly. Speed and timer settings also only use the up and down buttons displayed on the LCD.
Based on the explanation above, this research will make a centrifugation device by using a brushless DC motor as a drive with a speed control system using the pulse width modulation (PWM) technique on the Arduino, which is used to regulate the motor speed in the centrifuge. The optocoupler sensor will detect motor rotation. The centrifuge is also equipped with a timer. Setting the speed and time to be used can be set with the keypad 4x4, where the input motor speed and time will be displayed in the seven segments.

Research methods
The tools and materials used in this research are a brushless DC motor, Arduino, 4x4 keypad, two sevensegment ESC (Electronic Speed Control), battery, and optocoupler sensors.
The hardware design in this study consisted of a battery, 4x4 keypad, seven-segment, motor driver, optocoupler, and brushless DC motor. The 4x4 keypad is used to give input commands to the Arduino in the form of the amount of speed and time used. Arduino and ESC (Electronic Speed Control) use the battery as a power supply. A brushless DC motor is used to drive the sample tube. An optocoupler sensor can detect motor rotation speed, and the data obtained will be displayed using seven segments. Seven segments also serve to display the input speed and time values used. ESC (Electronic Speed Control) is used as a DC brushless motor driver or regulates the speed of a brushless motor using the PWM technique. The hardware design block diagram is shown in Figure 1. The battery is used as a power supply and connected to the switch and ESC. The ESC as a brushless DC motor driver is connected to GND, VCC, and the PWM pin, pin three on the Arduino, and the output of the ESC is connected to the brushless DC motor. The 4x4 keypad used as input for the speed and time values has eight pins connected to the Arduino digital pins, namely pins 4 to pin 11. The optocoupler is connected to pins A0, pin 2, GND, and VCC on Arduino. There are two seven segments used, namely seven segments to display motor speed and seven segments to display time. In the seven segments, there is a TM1637 module that reduces the number of pins on the seven segments connected to the Arduino. So it only uses two pins, namely data input/output (DIO) and clock input (CLK) which are connected to pins A2 and A3 on Arduino for seven-time segments and digital pins 12 and 13 on Arduino for seven-segment motor speed.

Results and Discussion
The centrifuge in this study was placed in a box made of acrylic which has a thickness of 5 mm. The centrifuge box is assembled in a box-like shape shown in Figure 3. The front view of the box has several holes that are used to place the seven-segment, on/off button, and 4x4 keypad.

Figure 3
The realization of the centrifuge Speed data retrieval is done by calibrating the rotational speed of the centrifuge. The rotational speed calibration is done by comparing the measurement results on the centrifuge with the calibration tool. The rotary speed calibration tool used is the digital tachometer DT-2234C+. The tachometer calibration tool is used by firing infrared rays at the brushless DC motor shaft. When using this tool, there are difficulties, namely the lack of consistency in the measured rotational speed value. This centrifuge can work with a speed range of 4,000 RPM to 7,000 RPM. The motor speed in the centrifuge starts from 4,000 RPM because the motor speed controller used is able to control the motor with a minimum speed of 4,000 RPM. Data collection is carried out five times at a speed of 5,000 to 7,000 with multiples of 500 RPM for 60 seconds. The data obtained can be seen in From the data obtained, the highest error value on the optocoupler sensor occurs at a rotational speed of 5,500, 4.70%, and the lowest error occurs at a speed of 6,000 at 1.23%. While the highest error on the tachometer occurs at a speed of 5,000 RPM at 3.62%, the lowest error value occurs at a speed of 6,000 RPM, which is 1.01%. These data also obtained the calculation of the average error value on the optocoupler sensor of 2.95%, so an accuracy rate of 97.05% is obtained. While the tachometer calibration tool obtained the calculation results of the average error value of 2.21%, and the level of accuracy obtained was 97.79%. It can also be seen that the output of the readings on the sensor and tachometer significantly differs. This is due to the vibration on the motor shaft, which is no longer straight, causing vibrations in the disk used to detect the rotation of the motor. Errors can also be caused by imperfect mechanics in the tool so that the rotation of the motor is not stable. The speed measurement calibration graph is shown in Figure 4 Figure 4 Speed measurement calibration graph Value R 2 is the level of suitability of the obtained line equation to the variation of the data. The value R 2 is between 0-1, where the ideal value is 1, which indicates that the line equation obtained follows the data variation (Effendi, 2020). Based on the graph in Figure 4.4 for the average output speed, the value R2= 0.9972 is obtained.
Testing the motor speed on the PWM input is done by comparing the input value from the keypad in the form of the PWM value with the output on the centrifuge in the form of RPM. The data obtained can be seen in Table 2 Journal of Energy, Materials, and Instrumentation Technology, Vol. 3 No. 3, 2022 1095 7240 1100 7680 Table 2 is a table of motor speed data on a centrifuge with an input value of PWM value. It can be seen in the table that the greater the PWM value, the faster the motor rotation will be. The graph of the relationship between PWM input and RPM output is shown in Figure 5  In the graph, the relationship between the input PWM value and the output speed of the centrifuge has good linearity, as evidenced by the obtained R 2 = 0.9906. However, there are also deviations at some speed points in the graph.
Time testing on the centrifuge is done by comparing the time value on the keypad with the output time. Time measurement is done using a stopwatch on the cellphone. Data retrieval was repeated from 60 to 600 seconds with multiples of 120 seconds. In the centrifuge, the time value is in seconds. The results of testing the input time with the output time can be seen in   Figure 4.6 for the average R 2 output time, the value = 0.9923 is obtained. Calculating the average error value obtained a value of 0.49%, so an accuracy rate of 99.51% is obtained.

Conclusion
Based on the research that has been done, several conclusions are obtained. The greater the PWM value, the faster the motor rotation will be. Namely, the Arduino Uno-based centrifuge device has been successfully made and can work with a speed range of 4,000 RPM to 7,000 RPM. The brushless DC motor speed controller can control the motor with a minimum speed of 4,000 RPM. The rotational speed measurement calibration was carried out using a DT-2234C+ tachometer, the highest error occurred at 5,000 RPM, which was 3.62%, and the lowest error occurred at 6,000 RPM at 1.01%.