DC Motor Rotary Speed Control with Arduino UNO Based PID Control

— Along with the development of the times, DC motors are often used in industrial equipment or household appliances, but in DC motors they often experience a decrease due to the given load, it requires a controller. This research uses PID (Proportional Derivative) controller. In this study, the DC motor can be controlled despite the load using the trial and error method. This study uses Arduino UNO software for testing using parameters 𝑲𝒑 = 𝟏.𝟓 , 𝑲𝒊 = 𝟎. 𝟖𝟕 , 𝑲𝒅 = 𝟎. 𝟐𝟕 , parameter y is the parameter value 𝑲𝒑 , 𝑲𝒊 , 𝑲𝒅 obtained from the system response according to the software used. the value of rise time = 0.9925 Tested, Time = 2.7368, Overshoot = 1.3333 and Steady State Error = 0


INTRODUCTION
In today's era, the need for motors that have great efficiency, large torque, large and variable speeds, and relatively low maintenance budgets continues to grow.However, the motors that are universally produced at this time, are DC motors and induction motors, so these needs have not been met.In DC motors, the motor drive uses DC voltage on the rotor [1].
But on the other hand, DC motors require large maintenance costs.Large maintenance costs arise because DC motors use brushes for commutation.The brush quickly faces destruction because when the motor turns around, on the brush, arching will arise on the brush due to the commutation process.Induction motors require lower maintenance costs and have greater speed than DC motors [2] [3].
With the development of technology, various microcontrollers have become widespread in the market today.Starting from the cost, limitations on expertise or memory types as well as other facilities provided from the manufacturer that are easy and suitable to apply as desired.The use of microcontrollers in the process of control or automatic control has benefited many areas in terms of efficiency, accuracy, and effectiveness, as well as in terms of accuracy, reliability, and speed of the creation process can continue to grow [4] [3].
DC motor is one of the easy-to-apply motors.This convenience makes DC motors often used in all kinds of purposes, including industrial equipment or household appliances.However, in its application, the speed of the DC motor often occurs due to a load so that the speed is unstable [5] [13].
PID (Proportional-Integral-Derivative) controllers are universal controllers used in various industrial processes.The popularity of PID controllers results from their good performance over a wide range of conditions due to the simplicity of the PID, which allows engineers to operate them directly.To implement the PID controller, three parameters must be set in the controlled process which include proportional gain, integral gain, and derivative gain [6][7] [14].
Today, the tech world often uses Differential Integral Proportional (PID) control as a feedback controller.Because it is tested to be able to share control performance well, can speed up system reactions, and eliminate offsets, although it has a simple but easy-to-understand algorithm [8] [15].
In the study, the speed of DC motors is often abnormal due to external constraints or changes in parameters from the fabrication, so it is necessary to try the controller design.The controller designed using PID consists of 3 types of settings combined, namely the P (Proportional), I (Integral), and D (Derivative) controls.Switching to the PID control set on the keypad and the best time (Time Sampling) obtained to obtain stability from the coveted DC motor speed ATMega328 Microcontroller [6][16].
This study explains the adjustment of a single-phase induction motor in this study utilizing a Proportional Integral Derivative (PID) controller to adjust the motor speed to maintain a constant speed along with load changes.This speed setting is controlled by PWM pulses to obtain a frequency corresponding to the reference speed.In this study, no-load testing obtained motor rise time will accelerate at smaller reference speeds [9] [17].
In this study, it was focused on determining the value of PID control parameters that worked optimally using the manual trial error tuning method using Aspen Hysis V8,6.Research was conducted to determine whether PID control could work optimally in stabilizing errors if given disturbances in temperatures that had been set in the reactants [10] [18] .
In this study, we will design a DC motor control model using several kinds of controls, namely PID control tuned with autotuning Matlab, PID led with Ant Colony Optimization (ACO) to control speed [11][19].
This study uses a PID control system using a feedback encoder as feedback based on microcontroller Arduino UNO and its application to a no-load DC motor by using visual studio application as an interface that functions to input set point values in PID parameters and present data in graphs in real time [12] [20].
Rikwan, Control Speed Rotary Motor DC with Control PID Based Arduino UNO

II. METHODS
The design of this system is carried out with two stages of design, namely hardware design and software design.Hardware design required block diagrams, circuit diagrams, and tool designs.The design of the software contains a flow chart of the method used.
In this study, a process of identifying problems in the DC motor was carried out, where the rotation of the DC motor needs to be controlled at speed in accordance with the function and use of the motor.The factors that are considered in this study are motor speed control and calculation of controlling values.To get optimal results, a study was carried out and subsequently the appropriate hardware was made and the manufacture of software to operate the system from the driver motor and DC motor.After that, tool testing is carried out to obtain data to be processed and compared with previous studies.The research flow chart of the automatic feeding system can be seen in Fig. 1.

A. Hardware Design
The hardware design of this dc motor's angular velocity control system rests on the Arduino Uno controller which controls all sensors and actuators.The hardware design block diagram can be seen in Fig. 2. The design of this DC motor angular velocity control system uses an Arduino UNO microcontroller to regulate a DC motor that has an encoder in it, Arduino will send a voltage signal to the driver motor to be subsequently discharged to the DC motor according to the voltage calculation results of the PID controller.The voltage value in the DC motor is influenced by the PID controller, depending on the setpoint value and the value of each Proportional-integral-derivative controller, the result of the PID controller is the angular velocity of the DC motor.
PID control results in addition to the rotation results on the DC motor, this study also displays the PID control results through a graph displayed by the serial monitor, data from the serial monitor will later be processed to in the application MATLAB will be used to calculate the results of the PID controller so that the values of the PID control parameters are obtained, such as the calculation of risetime, settling time, overshoot, undershoot and its peak value.Hardware design begins with creating a wiring diagram of the components used and continues with hardware assembly.Assembly is n the process of connecting the wiring of all t-gauge so that the reading of the value of the driver motor and the rotation of the DC motor is obtained.The wiring diagram of the entire system can be seen in Fig. 3. Fig. 3. Wiring diagram Fig. 3 is the wiring circuit of this system, all components are connected by the Arduino UNO with a power supply coming from a 12 Volt adapter.The motor driver and DC motor are directly connected with the Arduino pins.The pins used on the Arduino UNO can be seen in Table I.

B. 3D Design
Mechanical manufacturing in this system begins with 3D creation to get an estimate of the size of the hardware.The design includes the entire mechanics of the DC motor speed system in the form of a black plastic box, this system will have two boxes, of which the first box contains a DC motor, the second box will contain arduino UNO and a driver motor.The two boxes at the top will be pinned to be paired with a jack tire, later this system will be uninstalled, so that users can easily understand and use this system.The two boxes will later be connected to each other with a cable through the jack hole at the top of the box.The 3D design of the overall system can be seen in Fig. 4. Fig. 4 is a 3D design of the control box of the DC motor rotary speed control system.The frame-shaped system is made of plastic boxes and arranged in such a way following a 3D design.A more detailed explanation can be seen in Table II.Step Down (LM2596) As a voltage lowering from Power Supply 12 V to 5 V Arduino Uno

C. Software design
Software design, that is, the program for the Arduino UNO controller is created through the Arduino IDE application and downloaded via a USB cable to the node board.Fig. 5 is an explanation of the system flow chart.
Based on Fig. 5, it can be understood that the motor speed control system uses the PID control method, starting with the inclusion of the values of the coefficients P, I and D and the desired setpoint value.The program will process the PID input and later the physical output is in the form of the angular speed of the DC motor, the speed of the DC motor is basically obtained from the voltage given after being given a PID controller.The speed of the DC motor will always be monitored and detected by the encoder sensor, the encoder will always calculate what speed the motor is rotating, if the speed of the motor is different from the PID value (Reference Value) then the encoder will send the next error value, the error value will be processed and corrected, the repair results will again be issued by the Arduino in the form of DC motor rotation in accordance with the PID value (reference value).

A. DC Motor Testing
In testing the PG28 DC motor, it was carried out by giving a PWM speed value, where in this experiment using PWM 255 can be seen on Fig. 6.By using a tachometer where the motor test results are as expected on Fig. 7.

B. Overall System Testing a) PID testing
The approval of the DC motor speed control design system using PID control where in this test by changing the values of ,  and , the results can be seen in Fig. 8.It can be seen in Table III by changing the value of ,  and  value can be seen the results of the Rise Time which is small and there is no error.

b) Load PID Testing
The approval of the DC motor speed control design system using PID control where in this test by changing the values of ,  and  with a load, the results can be seen as follows.It can be seen in Table IV by changing the value of ,  and the value of  given the load can be seen the result of the Rise Time obtained is greater than the PID, larger overshot and small error.

IV. CONCLUSION
Based on the discussion and test results of the research controller of the angular velocity of the DC motor using the Arduini UNO-based PID method, conclusions were obtained.
For the work of the DC motor control tool system that has been designed and can be controlled so that it reaches the rotation that is in line with the reference value that has been given.
The correct PID value to control the speed of the DC motor rotation can be found by changing the values of KP, KI, and KD values using the trial and error method, in the trial and error process, the values used with  = 1.5,  = 0.87,  = 0.27 are obtained.
From the parameters that have been tested, the system response is obtained from the values of the , ,  parameters that correspond to software testing where the value of Rise Time = 0.9925, settling time = 2.7368, overshoot = 1.3333 and steady state error = 0

ACKNOWLEDGMENT
The author would like to thank the editors and reviewers for their suggestions and input so that this journal can be resolved.To all parties involved in the research and Rikwan, Control Speed Rotary Motor DC with Control PID Based Arduino UNO preparation of this journal, the author also expresses his gratitude.May Allah swt repay the kindness of all parties involved and count as a worship charity

Fig. 8 .
Fig. 8. Graphic control PID It can be seen Fig. 8 of the comparison chart of PID values that change the value of ,  and  values obtained the best results as in Fig.8where the results obtained are as desired stably at the given set point value.

Fig. 9 .
Fig. 9. Load PID control graphIt can be seen Fig.9of the comparison chart of PID values given the load by changing the values of ,  and  values obtained the best results as in Fig.9.Hasil obtained as desired stably at the given set point value even though the resulting Rise Time result is slower than in PID which is not given a load.

TABLE I .
ARDUINO UNO INPUT AND OUTPUT PINS

TABLE II .
SYSTEM CONTROL BOX DESCRIPTION

TABLE III .
PID CONTROL